From 40c4c1b43356829c1fe22bb6da3fe78988180ab8 Mon Sep 17 00:00:00 2001 From: Romain Porte Date: Sun, 19 Jul 2020 00:10:56 +0200 Subject: [PATCH] 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) --- tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index cd6eb3b..fcec6ff 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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