Skip to content

Commit

Permalink
FIX permission change and hook creation only if folder exists already
Browse files Browse the repository at this point in the history
  • Loading branch information
BrutalBirdie committed Apr 21, 2022
1 parent e49e327 commit 548b865
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
groups: "{{ coturn_tls_group }}"
append: true
when: coturn_tls_group is defined
- name: Get file info of TLS Folder
stat:
path: "{{ coturn_tls_cert_dir }}"
register: stat_coturn_tls_cert_dir
- name: Grant turnserver user access to certificate folder
acl:
path: "{{ coturn_tls_cert_dir }}"
Expand All @@ -28,14 +32,15 @@
permissions: rx
recursive: yes
state: present
when: stat_coturn_tls_cert_dir.stat.exists
- name: Setup certbot post hook
template:
src: "certbot/permission_fix.sh.j2"
dest: "/etc/letsencrypt/renewal-hooks/post/permission_fix.sh"
owner: "root"
group: "root"
mode: "0755"
when: coturn_tls_cert_dir == "/etc/letsencrypt"
when: stat_coturn_tls_cert_dir.stat.exists
- name: Copy Diffie-Hellmann parameter (from https://ssl-config.mozilla.org/ffdhe2048.txt)
copy:
src: dhparam.pem
Expand Down

0 comments on commit 548b865

Please sign in to comment.