File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ - name : Check if certificate already exists
3+ stat :
4+ path : " /etc/letsencrypt/live/{{ certbot_nginx_cert_name | default(domain_name, true) }}/cert.pem"
5+ register : letsencrypt_cert
6+
7+ - 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 is defined %} --cert-name '{{ certbot_nginx_cert_name }}' {% endif %} {% if letsencrypt_staging %} --staging {% endif %}"
9+ when : not letsencrypt_cert.stat.exists
Original file line number Diff line number Diff line change 1414 name : " python-certbot-nginx=0.28.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+3"
1515 state : present
1616
17- - name : Check if certificate already exists
18- stat :
19- path : " /etc/letsencrypt/live/{{ certbot_nginx_cert_name | default(domain_name, true) }}/cert.pem"
20- register : letsencrypt_cert
21-
22- - name : Generate new certificate if one doesn't exist
23- 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 %}"
24- when : not letsencrypt_cert.stat.exists
17+ - import_tasks : certificate.yml
18+ when : domain_name is defined
You can’t perform that action at this time.
0 commit comments