aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ansible/roles/nginx/tasks/main.yml3
1 files changed, 2 insertions, 1 deletions
diff --git a/ansible/roles/nginx/tasks/main.yml b/ansible/roles/nginx/tasks/main.yml
index 5b5541a..aa81326 100644
--- a/ansible/roles/nginx/tasks/main.yml
+++ b/ansible/roles/nginx/tasks/main.yml
@@ -27,13 +27,14 @@
group: root
mode: 0644
register: tls_certs_list_file
+ when: tls_certs is defined
# this way invalid custom configs cant prevent nginx from starting, thus preventing uacme from running
- name: delete nginx custom configs if the tls_certs variable has changed
file:
path: /etc/nginx/conf.d
state: absent
- when: tls_certs_list_file.changed
+ when: tls_certs is defined and tls_certs_list_file.changed
- name: ensure /etc/nginx/conf.d exists
file: