Skip to content

Commit

Permalink
Changed task to ensure authenticator is updated to webroot for domain…
Browse files Browse the repository at this point in the history
…s initially generated as standalone.
  • Loading branch information
adamdyson committed Jun 24, 2019
1 parent 734882a commit b417604
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
- 'certbot_missing_certificate_count | int > 0'
- 'certbot_web_server_running.rc == 0'

- name: 'Certbot | Generate certificates.'
- name: 'Certbot | Generate standalone certificates.'
become: yes
command: '{{ certbot_script }} certonly --standalone --email {{ item.1.email }} -n --agree-tos --keep -d {{ item.1.domains|join(",") }}'
when: 'not certbot_certificate_paths.results[item.0].stat.exists'
Expand All @@ -54,14 +54,11 @@
- 'certbot_missing_certificate_count | int > 0'
- 'certbot_web_server_running.rc == 0'

- name: 'Certbot | Update certificate domains.'
- name: 'Certbot | Update certificate authenticator and domains.'
become: yes
command: '{{ certbot_script }} certonly --webroot --cert-name {{ item.1.domains | first | replace("*.", "") }} -n -d {{ item.1.domains|join(",") }} -w {{ item.1.webroot }}'
register: 'certbot_certificate_update'
notify: 'reload web server'
when:
- 'certbot_certificate_paths.results[item.0].stat.exists'
- 'certbot_web_server_running.rc == 0'
with_indexed_items: '{{ certbot_certificates }}'
changed_when: '"Your certificate and chain have been saved" in certbot_certificate_update.stdout'

Expand Down

0 comments on commit b417604

Please sign in to comment.