Fix folder permissions for Mastodon

This commit is contained in:
Sam A. 2023-07-11 22:26:08 +02:00
parent ec73fb702c
commit e2a6d19a32
Signed by untrusted user: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -1,18 +1,33 @@
# vim: ft=yaml.ansible # vim: ft=yaml.ansible
--- ---
- name: create mastodon volume folders - name: Create volume folder for Mastodon data
file: file:
name: "{{ services.mastodon.volume_folder }}/{{ volume }}" name: "{{ services.mastodon.volume_folder }}/mastodon_data"
state: directory state: directory
owner: "991" owner: "991"
group: "991" mode: u=rwx,g=rx,o=rx
loop:
- "postgres_data" - name: Create volume folder for PostgreSQL data
- "postgres_config" file:
- "redis_data" name: "{{ services.mastodon.volume_folder }}/postgres_data"
- "mastodon_data" state: directory
loop_control: owner: "70"
loop_var: volume mode: u=rwx,go=
- name: Create volume folder for PostgreSQL config
file:
name: "{{ services.mastodon.volume_folder }}/postgres_config"
state: directory
owner: root
mode: u=rwx,g=rx,o=rx
- name: Create volume folder for Redis data
file:
name: "{{ services.mastodon.volume_folder }}/redis_data"
state: directory
owner: "999"
group: "1000"
mode: u=rwx,g=rx,o=rx
- name: Copy mastodon environment file - name: Copy mastodon environment file
template: template: