diff --git a/tasks/haproxy-letsencrypt-acme-sh.yml b/tasks/haproxy-letsencrypt-acme-sh.yml index 40028f6..98dfa43 100644 --- a/tasks/haproxy-letsencrypt-acme-sh.yml +++ b/tasks/haproxy-letsencrypt-acme-sh.yml @@ -7,7 +7,12 @@ template: src=haproxy-letsencrypt-acme.sh.j2 dest={{ letsencrypt_acme_sh_services_scripts_dir }}/haproxy owner=root group=root mode=4555 - name: Create the haproxy PKI directory - file: dest=/etc/pki/haproxy state=directory owner=root group=haproxy mode=0750 + file: + dest: /etc/pki/haproxy + state: directory + owner: root + group: "{%if not haproxy_docker_container %}haproxy{% else %}root{% endif %}" + mode: "0750" - name: Run the letsencrypt hook once, to create the certificate chain that haproxy will use shell: "{{ letsencrypt_acme_sh_services_scripts_dir }}/haproxy"