45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
---
|
|
- 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
|