Restore homeassistant stuff

This commit is contained in:
Salt 2023-11-28 15:45:41 -06:00
parent a2720a2b42
commit 28cb44c95a
3 changed files with 46 additions and 13 deletions

44
playbooks/home_automation.yml Executable file
View File

@ -0,0 +1,44 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
# Home media storage Pi
- hosts: pi-homeauto-1.home.mgmt.desu.ltd
gather_facts: no
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:
- ddns-route53.yml
- 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 ]

View File

@ -6,3 +6,5 @@
# Production configuration
- import_playbook: prod_db.yml
- import_playbook: prod_web.yml
# Home automation stuff
- import_playbook: home_automation.yml

View File

@ -1,13 +0,0 @@
# vim:ft=ansible:
- name: docker deploy ddclient
docker_container:
name: ddclient
state: started
image: linuxserver/ddclient:latest
restart_policy: unless-stopped
pull: yes
env:
TZ: America/Chicago
volumes:
- /data/ddclient:/config
tags: [ docker, ddclient ]