Skip to content
Snippets Groups Projects
Commit c36e2374 authored by jurgenhaas's avatar jurgenhaas
Browse files

Do not ignore errors when creating or renewing certs

parent 3be20369
No related branches found
No related tags found
No related merge requests found
......@@ -22,12 +22,10 @@
- name: Install New Cert via webroot
shell: certbot certonly --expand --non-interactive --config /etc/letsencrypt/{{ cert.domain }}.ini --cert-name {{ cert.domain }} --webroot-path /var/www/html --webroot
ignore_errors: yes
when: groups.proxyserver is not defined or inventory_hostname not in groups.proxyserver
- name: Install New Cert via HaProxy
shell: certbot certonly --expand --non-interactive --config /etc/letsencrypt/{{ cert.domain }}.ini --http-01-port {{ port }} --preferred-challenges http-01 --cert-name {{ cert.domain }}
ignore_errors: yes
when: groups.proxyserver is defined and inventory_hostname in groups.proxyserver
- name: Close Port
......
......@@ -24,14 +24,12 @@
- name: Renew Existing Certs via webroot
shell: certbot renew --non-interactive --webroot-path /var/www/html --webroot
ignore_errors: yes
register: renew_result
changed_when: '"No renewals were attempted." not in renew_result.stdout'
when: groups.proxyserver is not defined or inventory_hostname not in groups.proxyserver
- name: Renew Existing Certs via HaProxy
shell: certbot renew --non-interactive --http-01-port {{ port }} --preferred-challenges http-01
ignore_errors: yes
register: renew_result
changed_when: '"No renewals were attempted." not in renew_result.stdout'
when: groups.proxyserver is defined and inventory_hostname in groups.proxyserver
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment