1
0
Fork 0

Configure influxdb if homeassistant_influxdb_host is set

This commit is contained in:
Daniele Tricoli 2021-05-30 00:32:55 +02:00
parent dc22ff1aa5
commit f28d8e7be9
1 changed files with 12 additions and 0 deletions

View File

@ -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"