webroot: install hook before creating certificates

The command that will create the certificates need the hook script
ansible.sh to exist before it is run, elsewise an error will occur in
case of first run on a new host.

(cherry picked from commit 2346cd52a262bf2fa89419f29abba0e8ea95cdb7)
pull/97/head
Romain Porte 4 years ago committed by Simon Spannagel
parent bd58f8e72c
commit 40c4c1b433
  1. 8
      tasks/main.yml

@ -21,6 +21,10 @@
loop_control: loop_control:
loop_var: cert_item loop_var: cert_item
- include_tasks: install-deploy-hook.yml
when:
- certbot_create_method == 'webroot'
- include_tasks: create-cert-webroot.yml - include_tasks: create-cert-webroot.yml
with_items: "{{ certbot_certs }}" with_items: "{{ certbot_certs }}"
when: when:
@ -29,9 +33,5 @@
loop_control: loop_control:
loop_var: cert_item loop_var: cert_item
- include_tasks: install-deploy-hook.yml
when:
- certbot_create_method == 'webroot'
- import_tasks: renew-cron.yml - import_tasks: renew-cron.yml
when: certbot_auto_renew when: certbot_auto_renew

Loading…
Cancel
Save