Skip to content

Commit 2058be6

Browse files
committed
Fix conditional generating new certificate
1 parent b72337a commit 2058be6

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tasks/certificate.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55
register: letsencrypt_cert
66

77
- name: Generate new certificate if one doesn't exist
8-
shell: "certbot certonly --nginx --email '{{ letsencrypt_email }}' --agree-tos -d '{{ domain_name }}' {% if certbot_nginx_cert_name %} --cert-name '{{ certbot_nginx_cert_name }}' {% endif %} {% if letsencrypt_staging %} --staging {% endif %}"
8+
shell: "certbot certonly --nginx --email '{{ letsencrypt_email }}' --agree-tos -d '{{ domain_name }}' {% if certbot_nginx_cert_name is defined %} --cert-name '{{ certbot_nginx_cert_name }}' {% endif %} {% if letsencrypt_staging %} --staging {% endif %}"
99
when: not letsencrypt_cert.stat.exists
10-

0 commit comments

Comments
 (0)