2021-03-26 21:58:55 -05:00
|
|
|
#!/usr/bin/env ansible-playbook
|
|
|
|
# vim:ft=ansible:
|
|
|
|
---
|
2021-11-09 20:53:59 -06:00
|
|
|
- hosts: vm-media-1.home.mgmt.desu.ltd
|
2021-09-13 13:50:22 -05:00
|
|
|
module_defaults:
|
|
|
|
docker_container:
|
|
|
|
state: started
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
pull: yes
|
2021-11-10 19:11:10 -06:00
|
|
|
pre_tasks:
|
2021-11-09 20:53:59 -06:00
|
|
|
- name: assure nfs mount directory
|
2021-06-20 19:15:15 -05:00
|
|
|
file: path=/data state=directory mode=0755
|
2021-03-26 21:58:55 -05:00
|
|
|
tags: [ pis, storage ]
|
2021-11-09 20:53:59 -06:00
|
|
|
- name: assure nfs mount
|
2021-11-10 19:29:06 -06:00
|
|
|
mount: path=/data/shared src=vm-fs-1.home.mgmt.desu.ltd:/nfs/media fstype=nfs4 opts="rsize=10248576,wsize=1048576,soft,timeo=600,retrans=2,_netdev" state=mounted
|
2021-03-26 21:58:55 -05:00
|
|
|
tags: [ pis, storage ]
|
2021-09-13 13:50:22 -05:00
|
|
|
- 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
|
|
|
|
- jackett.yml
|
|
|
|
- sonarr.yml
|
|
|
|
- radarr.yml
|
|
|
|
loop_control:
|
|
|
|
loop_var: task
|
|
|
|
tags: [ always ]
|
2021-03-26 21:58:55 -05:00
|
|
|
roles:
|
|
|
|
- role: backup
|
|
|
|
vars:
|
2021-05-01 19:44:28 -05:00
|
|
|
backup_s3backup_list_extra:
|
2021-09-13 13:50:22 -05:00
|
|
|
- /data/transmisson
|
|
|
|
- /data/jackett
|
|
|
|
- /data/sonarr
|
2021-05-01 19:44:28 -05:00
|
|
|
backup_time: "Mon *-*-* 02:00:00"
|
2021-03-26 21:58:55 -05:00
|
|
|
tags: [ backup ]
|
2021-09-27 15:12:20 -05:00
|
|
|
- role: ingress
|
|
|
|
vars:
|
|
|
|
ingress_container_image: "nginx:latest"
|
|
|
|
ingress_container_ports:
|
|
|
|
- 80:80
|
2021-09-27 17:18:30 -05:00
|
|
|
ingress_container_config_mount: /etc/nginx/conf.d
|
2021-09-27 15:12:20 -05:00
|
|
|
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: jackett.local.desu.ltd
|
|
|
|
proxy_pass: http://jackett:9117
|
|
|
|
- name: sonarr.local.desu.ltd
|
|
|
|
proxy_pass: http://sonarr:8989
|
|
|
|
- name: radarr.local.desu.ltd
|
|
|
|
proxy_pass: http://radarr:7878
|
|
|
|
tags: [ ingress ]
|