1
0
Fork 0
This commit is contained in:
Massaki Archambault 2022-08-29 09:23:19 -04:00
parent 90b904595a
commit 6fac939363
5 changed files with 46 additions and 1 deletions

8
hosts
View File

@ -40,6 +40,13 @@ all:
bastion: bastion:
ansible_host: 192.168.20.10 ansible_host: 192.168.20.10
users_enable_sudo: false users_enable_sudo: false
plex:
hosts:
plex:
ansible_host: 192.168.20.31
nfs_libraries:
- 192.168.20.30:/mnt/pool0/badjware/Videos/Movies
- 192.168.20.30:/mnt/pool0/badjware/Videos/Series
k3s: k3s:
children: children:
k3s-server: k3s-server:
@ -72,5 +79,6 @@ all:
proxmox: proxmox:
bastions: bastions:
k3s: k3s:
plex:
vars: vars:
<<: *user_config <<: *user_config

View File

@ -16,4 +16,8 @@
- k3s-server - k3s-server
- hosts: k3s-agent - hosts: k3s-agent
roles: roles:
- k3s-agent - k3s-agent
- hosts: plex
roles:
- plex

View File

@ -10,6 +10,7 @@
- curl - curl
- vim - vim
- tmux - tmux
- gpg
- name: Set default editor to vim - name: Set default editor to vim
lineinfile: lineinfile:

View File

@ -0,0 +1 @@
nfs_libraries: []

31
roles/plex/tasks/main.yml Normal file
View File

@ -0,0 +1,31 @@
- name: Add plex package repository key
ansible.builtin.apt_key:
url: https://downloads.plex.tv/plex-keys/PlexSign.key
- name: Add plex package repository
apt_repository:
repo: deb https://downloads.plex.tv/repo/deb public main
- name: Install packages
apt:
update_cache: yes
name:
- gpg
- plexmediaserver
- nfs-common
- name: Create library mount points
file:
path: "/mnt/{{ item|regex_replace(':','/') }}"
state: directory
loop: '{{ nfs_libraries }}'
- name: Create library mount points
mount:
boot: yes
path: "/mnt/{{ item|regex_replace(':','/') }}"
src: "{{ item }}"
fstype: nfs
opts: defaults,ro,_netdev
state: mounted
loop: '{{ nfs_libraries }}'