From d15779f99ad9e1641ff98041b2bb41ee99a9a8fd Mon Sep 17 00:00:00 2001 From: Ethan Paul <24588726+enpaul@users.noreply.github.com> Date: Sun, 22 Mar 2020 21:20:57 -0400 Subject: [PATCH] Add deployment playbook for intierm plex server --- playbooks/deploy-plex.yml | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 playbooks/deploy-plex.yml diff --git a/playbooks/deploy-plex.yml b/playbooks/deploy-plex.yml new file mode 100644 index 0000000..001e511 --- /dev/null +++ b/playbooks/deploy-plex.yml @@ -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