apache2: Fix certificate existence check

This commit is contained in:
s3lph 2021-04-26 00:48:28 +02:00
parent 6922e9a945
commit 796d5edc76

View file

@ -33,8 +33,8 @@
vars:
name: "{{ item.key }}"
site: "{{ item.value }}"
certfile_exists: "{{ apache2_register_stat_tls_keypairs[item.value.tls_certfile | default(apache2_tls_certfile)].stat.exists }}"
keyfile_exists: "{{ apache2_register_stat_tls_keypairs[item.value.tls_keyfile | default(apache2_tls_keyfile)].stat.exists }}"
certfile_exists: "{{ (apache2_register_stat_tls_keypairs.results | selectattr('item', 'equalto', (item.value.tls_certfile | default(apache2_tls_certfile)) ).stat.exists }}"
keyfile_exists: "{{ (apache2_register_stat_tls_keypairs.results | selectattr('item', 'equalto', (item.value.tls_certfile | default(apache2_tls_keyfile)) ).stat.exists }}"
loop: "{{ apache2_sites | dict2items }}"
notify: reload apache2