ansible-nas/tasks/homeassistant.yml

27 lines
772 B
YAML
Raw Normal View History

2019-07-23 20:07:40 +00:00
- name: Create Home Assistant Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ homeassistant_data_directory }}/config"
- name: Home Assistant Docker Container
docker_container:
name: homeassistant
image: homeassistant/home-assistant
pull: true
volumes:
- "{{ homeassistant_data_directory }}/config:/config:rw"
ports:
- "8123:8123"
restart_policy: unless-stopped
env:
TZ: "{{ ansible_nas_timezone }}"
2019-07-23 20:07:40 +00:00
labels:
traefik.backend: "homeassistant"
traefik.frontend.rule: "Host:homeassistant.{{ ansible_nas_domain }}"
traefik.enable: "{{ homeassistant_available_externally }}"
2019-10-13 22:10:54 +00:00
traefik.port: "8123"
2019-07-23 20:07:40 +00:00
traefik.frontend.headers.SSLRedirect: "true"
memory: 1g