Create webroot directory if it doesn't exist

This commit is contained in:
Simon Spannagel 2020-01-14 13:50:39 +01:00
parent 2e13cb13cf
commit 50d8921ec2

View File

@ -12,6 +12,11 @@
run_once: true run_once: true
when: certbot_deployhook is defined 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. - name: Generate new certificate if one doesn't exist.
command: "{{ certbot_create_command }}" command: "{{ certbot_create_command }}"
when: not letsencrypt_cert.stat.exists when: not letsencrypt_cert.stat.exists