mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-27 03:53:06 +00:00
25 lines
764 B
YAML
25 lines
764 B
YAML
- 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"
|
|
network_mode: host
|
|
restart_policy: unless-stopped
|
|
env:
|
|
TZ: "{{ ansible_nas_timezone }}"
|
|
labels:
|
|
traefik.backend: "homeassistant"
|
|
traefik.frontend.rule: "Host:homeassistant.{{ ansible_nas_domain }}"
|
|
traefik.enable: "{{ homeassistant_available_externally }}"
|
|
traefik.port: "8123"
|
|
traefik.frontend.headers.SSLRedirect: "true"
|
|
memory: 1g
|