From 50d8921ec2bc9bab59a7937829977b8af899cac6 Mon Sep 17 00:00:00 2001 From: Simon Spannagel Date: Tue, 14 Jan 2020 13:50:39 +0100 Subject: [PATCH] Create webroot directory if it doesn't exist --- tasks/create-cert-webroot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/create-cert-webroot.yml b/tasks/create-cert-webroot.yml index dd47827..83a8a2a 100644 --- a/tasks/create-cert-webroot.yml +++ b/tasks/create-cert-webroot.yml @@ -12,6 +12,11 @@ run_once: true when: certbot_deployhook is defined +- name: Create webroot directory if it doesn't exist yet + file: + path: "{{ cert_item.webroot }}" + state: directory + - name: Generate new certificate if one doesn't exist. command: "{{ certbot_create_command }}" when: not letsencrypt_cert.stat.exists