apache2: Fix certificate existence check

This commit is contained in:
s3lph 2021-04-26 00:54:00 +02:00
parent 796d5edc76
commit 09a8ad12c2

View file

@ -33,8 +33,8 @@
vars:
name: "{{ item.key }}"
site: "{{ item.value }}"
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 }}"
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