Add deployment playbook for intierm plex server
This commit is contained in:
parent
2a9f5fb965
commit
d15779f99a
44
playbooks/deploy-plex.yml
Normal file
44
playbooks/deploy-plex.yml
Normal file
@ -0,0 +1,44 @@
|
||||
---
|
||||
- name: Deploy plex container
|
||||
hosts: remus
|
||||
tasks:
|
||||
- name: Create plex metadata volume
|
||||
docker_volume:
|
||||
name: plexmeta
|
||||
driver: local
|
||||
state: present
|
||||
recreate: never
|
||||
|
||||
- name: Create plex NFS media volume
|
||||
docker_volume:
|
||||
name: plexdata
|
||||
driver: local
|
||||
state: present
|
||||
recreate: never
|
||||
driver_options:
|
||||
type: nfs
|
||||
o: "addr=plexistore.tre2.local,ro"
|
||||
device: ":/nfs/plex"
|
||||
|
||||
- name: Allow plex access through the firewall
|
||||
become: true
|
||||
firewalld:
|
||||
state: enabled
|
||||
service: plex
|
||||
permanent: true
|
||||
immediate: true
|
||||
|
||||
- name: Launch plex container
|
||||
docker_container:
|
||||
name: pms
|
||||
state: started
|
||||
image: plexinc/pms-docker:latest
|
||||
pull: true
|
||||
recreate: "{{ omni_update_plex | default(false) | bool }}"
|
||||
network_mode: host
|
||||
volumes:
|
||||
- plexmeta:/config
|
||||
- plexdata:/data:ro
|
||||
env:
|
||||
TZ: America/New_York
|
||||
ALLOWED_NETWORKS: 10.42.100.0/24,10.42.101.0/24
|
Reference in New Issue
Block a user