2021-09-27 17:18:30 -05:00
|
|
|
#!/usr/bin/env ansible-playbook
|
|
|
|
# vim:ft=ansible:
|
|
|
|
---
|
|
|
|
# Home media storage Pi
|
2021-10-15 19:03:55 -05:00
|
|
|
- hosts: pi-homeauto-1.home.mgmt.desu.ltd
|
2022-02-15 15:19:34 -06:00
|
|
|
gather_facts: no
|
2021-09-27 17:18:30 -05:00
|
|
|
module_defaults:
|
|
|
|
docker_container:
|
|
|
|
state: started
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
pull: yes
|
|
|
|
pre_tasks:
|
|
|
|
- name: ensure docker network
|
|
|
|
docker_network: name=web
|
|
|
|
tags: [ docker ]
|
|
|
|
tasks:
|
|
|
|
- name: include tasks for apps
|
|
|
|
include_tasks: tasks/app/{{ task }}
|
|
|
|
with_items:
|
|
|
|
- homeassistant.yml
|
|
|
|
loop_control:
|
|
|
|
loop_var: task
|
|
|
|
tags: [ always ]
|
|
|
|
roles:
|
|
|
|
- role: backup
|
|
|
|
vars:
|
|
|
|
backup_s3backup_list_extra:
|
|
|
|
- /data
|
|
|
|
backup_time: "Sun *-*-* 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: homeauto.local.desu.ltd
|
|
|
|
proxy_pass: http://localhost:8123
|
|
|
|
tags: [ ingress ]
|