Check if item.letsencrypt is defined
This commit is contained in:
parent
5db4e2664e
commit
9d128697b3
|
@ -59,13 +59,13 @@
|
|||
shell: "certbot certonly --non-interactive --webroot --email {{ nginx_letsencrypt_email }} --agree-tos --webroot-path=/var/www/letsencrypt {% for domain in item.server_name %} -d {{ domain }} {% endfor %} --expand --rsa-key-size 4096;"
|
||||
when:
|
||||
- item.ssl
|
||||
- item.letsencrypt
|
||||
- item.letsencrypt is defined
|
||||
|
||||
- name: "Create certificate"
|
||||
shell: "certbot certonly --non-interactive --webroot --email {{ nginx_letsencrypt_email }} --agree-tos --webroot-path=/var/www/letsencrypt {% for domain in item.server_name %} -d {{ domain }} {% endfor %} --expand --rsa-key-size 4096;"
|
||||
when:
|
||||
- item.ssl
|
||||
- item.letsencrypt
|
||||
- item.letsencrypt is defined
|
||||
- item.state == "present" or item.state is not defined
|
||||
- vhost_changed.changed
|
||||
- item.letsencrypt_key is defined and item.letsencrypt_key == "rsa"
|
||||
|
@ -77,7 +77,7 @@
|
|||
shell: "certbot certonly --non-interactive --webroot --email {{ nginx_letsencrypt_email }} --agree-tos --webroot-path=/var/www/letsencrypt {% for domain in item.server_name %} -d {{ domain }} {% endfor %} --expand --key-type ecdsa --elliptic-curve secp384r1;"
|
||||
when:
|
||||
- item.ssl
|
||||
- item.letsencrypt
|
||||
- item.letsencrypt is defined
|
||||
- item.state == "present" or item.state is not defined
|
||||
- vhost_changed.changed
|
||||
- item.letsencrypt_key is not defined
|
||||
|
|
Loading…
Reference in New Issue