1
0
Fork 0

Fix ssl-cert check

This commit is contained in:
Daniele Tricoli 2021-05-30 03:26:50 +02:00
parent f25a30141f
commit 682cceb648
2 changed files with 8 additions and 7 deletions

View File

@ -50,8 +50,7 @@
append: true
become: true
when:
- homeassistant_add_to_ssl_cert_group
- ssl-cert in ansible_facts.getent_group
- homeassistant_add_to_ssl_cert_group and "ssl-cert" in ansible_facts.getent_group
- name: add homeassistant user to dialout, gpio and i2c groups
user:
@ -114,8 +113,7 @@
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_add_to_ssl_cert_group and "ssl-cert" in ansible_facts.getent_group
- homeassistant_ssl_certificate and homeassistant_ssl_key
notify: systemctl restart homeassistant

View File

@ -52,7 +52,10 @@
state: absent
remove: true
influxdb_bind_hostname: 127.0.0.1
homeassistant_influxdb_host: 127.0.0.1
homeassistant_add_to_ssl_cert_group: true
homeassistant_ssl_certificate: /var/lib/snakeoil/certs/example.org/fullchain.pem
homeassistant_ssl_key: /var/lib/snakeoil/certs/example.org/privkey.pem
# homeassistant_influxdb_host: 127.0.0.1
roles:
# - ../roles/apt_dist_upgrade
# - ../roles/common
@ -61,7 +64,7 @@
# - ../roles/iptables
# - ../roles/sshd
# - ../roles/fail2ban
# - ../roles/snake_oil_cert
- ../roles/snake_oil_cert
# - ../roles/users
# - ../roles/dehydrated
# - ../roles/nginx
@ -79,7 +82,7 @@
# beehive_bind: 10.10.10.10:8181,
# beehive_canonical_url: http://10.10.10.10:8181}
# - ../roles/mosquitto
- ../roles/influxdb
# - ../roles/influxdb
- ../roles/homeassistant
# - {role: ../roles/generate_ca, become: true}
# - {role: ../roles/generate_certificate, become: true}