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)
This commit is contained in:
Romain Porte 2020-07-19 00:10:56 +02:00 committed by Simon Spannagel
parent bd58f8e72c
commit 40c4c1b433

View File

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