43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
|
#!/usr/bin/env ansible-playbook
|
||
|
# vim:ft=ansible:
|
||
|
---
|
||
|
# Home media storage Pi
|
||
|
- hosts: pi-homeauto-1.desu.ltd
|
||
|
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 ]
|