Browse Source

Configure influxdb if homeassistant_influxdb_host is set

main
Daniele Tricoli 4 months ago
parent
commit
f28d8e7be9
  1. 12
      roles/homeassistant/tasks/main.yml

12
roles/homeassistant/tasks/main.yml

@ -93,6 +93,18 @@
port: 8123
delay: 10
- name: add influxdb settings in configuration.yaml
blockinfile:
path: "{{ homeassistant_config_dir }}/configuration.yaml"
marker: "# {mark} ANSIBLE INFLUXDB SETTINGS"
block: |
influxdb:
host: {{ homeassistant_influxdb_host }}
port: {{ homeassistant_influxdb_port }}
when:
- homeassistant_influxdb_host
notify: systemctl restart homeassistant
- name: add custom TLS settings in configuration.yaml
blockinfile:
path: "{{ homeassistant_config_dir }}/configuration.yaml"

Loading…
Cancel
Save