#!/usr/bin/env ansible-playbook # vim:ft=ansible: --- - hosts: vm-media-1.home.mgmt.desu.ltd gather_facts: no module_defaults: docker_container: state: started restart_policy: unless-stopped pull: yes pre_tasks: - name: assure nfs mount directory ansible.builtin.file: path=/data state=directory mode=0755 tags: [ pis, storage ] - name: assure nfs mount mount: path=/data/shared src=192.168.190.1:/nfs/media fstype=nfs4 opts="rsize=10248576,wsize=1048576,soft,timeo=600,retrans=2,_netdev" state=mounted tags: [ pis, storage ] - name: ensure docker network docker_network: name=web tags: [ docker ] - name: include tasks for apps include_tasks: tasks/app/{{ task }} with_items: - redis.yml loop_control: loop_var: task tags: [ always ] - name: include tasks for web services include_tasks: tasks/web/{{ task }} with_items: - transmission.yml - prowlarr.yml - sonarr.yml - radarr.yml - lidarr.yml - jellyfin.yml loop_control: loop_var: task tags: [ always ] roles: - role: backup vars: backup_s3backup_list_extra: - /data/transmisson - /data/sonarr backup_time: "Mon *-*-* 02:00:00" tags: [ backup ] - role: ingress vars: ingress_container_image: "nginx:latest" ingress_container_ports: - 80:80 ingress_container_config_mount: /etc/nginx/conf.d ingress_container_persist_dir: /data/nginx ingress_listen_args: 80 ingress_listen_tls: no ingress_servers: - name: transmission.local.desu.ltd proxy_pass: http://transmission:9091 - name: prowlarr.local.desu.ltd proxy_pass: http://prowlarr:9696 - name: jellyfin.local.desu.ltd proxy_pass: http://jellyfin:8096 - name: sonarr.local.desu.ltd proxy_pass: http://sonarr:8989 - name: radarr.local.desu.ltd proxy_pass: http://radarr:7878 - name: lidarr.local.desu.ltd proxy_pass: http://lidarr:8686 tags: [ ingress ]