Browse Source

Split long lines in when

main
Daniele Tricoli 4 months ago
parent
commit
3ba7cdf851
  1. 15
      roles/homeassistant/tasks/main.yml

15
roles/homeassistant/tasks/main.yml

@ -41,7 +41,9 @@
groups: ssl-cert
append: true
become: true
when: homeassistant_add_to_ssl_cert_group and "ssl-cert" in ansible_facts.getent_group
when:
- homeassistant_add_to_ssl_cert_group
- ssl-cert in ansible_facts.getent_group
- name: add homeassistant user to dialout, gpio and i2c groups
user:
@ -89,13 +91,16 @@
- name: add custom TLS settings in configuration.yaml
blockinfile:
path: /srv/homeassistant/.homeassistant/configuration.yaml
path: "{{ homeassistant_dir }}/.homeassistant/configuration.yaml"
marker: "# {mark} ANSIBLE TLS SETTINGS"
block: |
http:
ssl_certificate: /var/lib/dehydrated/certs/{{ domains[0].cname }}/chain.pem
ssl_key: /var/lib/dehydrated/certs/{{ domains[0].cname }}/privkey.pem
when: homeassistant_add_to_ssl_cert_group and "ssl-cert" in ansible_facts.getent_group
ssl_certificate: {{ homeassistant_ssl_certificate }}
ssl_key: {{ homeassistant_ssl_key }}
when:
- homeassistant_add_to_ssl_cert_group
- ssl-cert in ansible_facts.getent_group
- homeassistant_ssl_certificate and homeassistant_ssl_key
notify: systemctl restart homeassistant
become: "{{ homeassistant_become }}"

Loading…
Cancel
Save