Fix all the permissions...

This commit is contained in:
erebion 2023-09-04 22:33:53 +02:00
parent ad109ae70b
commit 2caf498bf3

View file

@ -5,33 +5,38 @@
pkg:
- docker.io
- name: "Create directories for Pretix"
ansible.builtin.file:
path: "{{ docker_volumes_dir }}/pretix"
state: directory
owner: root
group: root
mode: '0750'
recurse: true
- name: "Create directories for Pretix"
- name: "Create directories for Pretix and give it access"
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: 15371
group: 15371
mode: '0750'
mode: '0755'
with_items:
- "{{ docker_volumes_dir }}/pretix"
- "{{ docker_volumes_dir }}/pretix/data"
- "{{ docker_volumes_dir }}/pretix/conf"
- "{{ docker_volumes_dir }}/pretix/data/cache"
- "{{ docker_volumes_dir }}/pretix/data/logs"
- "{{ docker_volumes_dir }}/pretix/data/media"
- name: "Ensure Pretix has access to its files"
ansible.builtin.file:
path: "{{ item }}"
state: file
owner: 15371
group: 15371
mode: '0750'
with_items:
- "{{ docker_volumes_dir }}/pretix/data/.secret"
- name: "Create directories for Pretix (Postgres DB)"
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: 1337 #this is the ID Pretix uses
group: 1337
mode: '0750'
owner: 999
group: root
mode: '0700'
with_items:
- "{{ docker_volumes_dir }}/pretix/postgres-db"