mastodon: Adjust directory permissions
This patch reduces the permissions on the install directory to just the root user and also fixes the ansible-lint issue by specifying the `mode`. For all container mounted volumes, the ansible-lint rule is disabled, as the container takes care of the permissions etc.
This commit is contained in:
parent
22302117fa
commit
1d7d56814e
1 changed files with 7 additions and 3 deletions
|
@ -36,12 +36,15 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
mode: '0700'
|
||||||
|
owner: 'root'
|
||||||
|
group: 'root'
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ mastodon_install_location }}"
|
- "{{ mastodon_install_location }}"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Create data directories
|
- name: Create data directories
|
||||||
file:
|
file: # noqa 208 # Container manages permissions on its own
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
setype: "container_file_t"
|
setype: "container_file_t"
|
||||||
|
@ -56,8 +59,9 @@
|
||||||
- name: Create public data directory
|
- name: Create public data directory
|
||||||
file:
|
file:
|
||||||
path: "{{ mastodon_public_location }}/system"
|
path: "{{ mastodon_public_location }}/system"
|
||||||
owner: "991"
|
mode: '0755'
|
||||||
group: "991"
|
owner: '991'
|
||||||
|
group: '991'
|
||||||
state: directory
|
state: directory
|
||||||
setype: "container_file_t"
|
setype: "container_file_t"
|
||||||
become: true
|
become: true
|
||||||
|
|
Loading…
Add table
Reference in a new issue