Skip to content

Commit 68d4ca0

Browse files
committed
loglist: sort through the file permissions
1 parent 46b7bbf commit 68d4ca0

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

xmpp2/loglist.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,23 @@
4040
state: reloaded
4141

4242
tasks:
43-
- name: Create directories
43+
- name: Create read-only directories
4444
ansible.builtin.file:
4545
path: '{{ item }}'
4646
state: directory
47-
mode: 'u=rx,g,o=r'
47+
mode: 'u=rx,go='
4848
loop:
4949
- '{{ host_db_init_scripts_dir }}'
50-
- '{{ host_data_dir }}'
5150
- '{{ host_config_dir }}'
5251

52+
- name: Create read/write directories
53+
ansible.builtin.file:
54+
path: '{{ item }}'
55+
state: directory
56+
mode: 'u=rwx,go='
57+
loop:
58+
- '{{ host_data_dir }}'
59+
5360
- name: Create the Docker network
5461
community.docker.docker_network:
5562
name: loglist
@@ -58,7 +65,7 @@
5865
ansible.builtin.copy:
5966
src: loglist/init_db.sql
6067
dest: '{{ host_db_init_scripts_dir }}/init_db.sql'
61-
mode: 'u,g,o=rx'
68+
mode: 'u=rx,go='
6269

6370
- name: Set up the database container
6471
community.docker.docker_container:
@@ -84,7 +91,7 @@
8491
ansible.builtin.copy:
8592
src: loglist/application.conf
8693
dest: '{{ host_config_dir }}/application.conf'
87-
mode: 'u,g,o=r'
94+
mode: 'u=r,go='
8895

8996
- name: Set up the application container
9097
community.docker.docker_container:
@@ -116,5 +123,5 @@
116123
ansible.builtin.copy:
117124
src: nginx/conf.d/loglist.conf
118125
dest: /etc/nginx/conf.d/loglist.conf
119-
mode: "u=rx,go=rx"
126+
mode: 'u=rx,go='
120127
notify: Reload nginx

0 commit comments

Comments
 (0)