-
Notifications
You must be signed in to change notification settings - Fork 0
/
homeassistant.yml
72 lines (68 loc) · 2.27 KB
/
homeassistant.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
- name: HomeAssistant
hosts: "pi4"
vars:
host_config_dir: /etc/homeassistant
host_deconz_otau_dir: /etc/deconz/otau
host_deconz_dir: /opt/deconz
vars_files:
- secrets.yml
tasks:
- name: Ensure {{ host_deconz_dir }} dir exists
ansible.builtin.file:
path: "{{ host_deconz_dir }}"
state: directory
- name: Ensure {{ host_deconz_otau_dir }} dir exists
ansible.builtin.file:
path: "{{ host_deconz_otau_dir }}"
state: directory
# ansible-galaxy collection install community.docker
- name: Download deCONZ container for firmware upgrades
community.docker.docker_container:
name: deconz
image: deconzcommunity/deconz:stable
detach: true
network_mode: host
restart: true
restart_policy: always
pull: true
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "{{ host_deconz_dir }}:/opt/deCONZ"
- "{{ host_deconz_otau_dir }}:/root/otau"
env:
TZ: "Europe/Berlin"
DECONZ_WS_PORT: "8124"
DECONZ_WEB_PORT: "8125"
DECONZ_VNC_MODE: "0"
DECONZ_VNC_PORT: "8126"
DECONZ_VNC_PASSWORD: "{{ vault_deconz_vnc_password }}"
devices:
- "/dev/ttyACM0:/dev/ttyACM0"
#- "/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2268641-if00:/dev/ttyACM0"
# state: started
state: stopped
- name: Ensure {{ host_config_dir }} dir exists
ansible.builtin.file:
path: "{{ host_config_dir }}"
state: directory
# ansible-galaxy collection install community.docker
- name: Run HomeAssistant container
community.docker.docker_container:
name: homeassistant
image: ghcr.io/home-assistant/home-assistant:stable
privileged: true
detach: true
network_mode: host
restart: true
restart_policy: unless-stopped
pull: true
volumes:
- "{{ host_config_dir }}:/config"
env:
TZ: "Europe/Berlin"
devices:
- "/dev/ttyACM0:/dev/ttyACM0"
#- "/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2268641-if00:/dev/ttyACM0"
state: started
# state: stopped