From 6c84c9e089ea0bcba90853a11c00d1034d28c58b Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Sat, 7 Oct 2023 23:22:17 +0200 Subject: [PATCH] Fix the permssions when installed as container --- tasks/haproxy-letsencrypt-acme-sh.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"