1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_etebase.git synced 2024-08-16 10:19:52 +02:00

Cleanup file permissions

This commit is contained in:
L3D 2022-11-14 12:37:00 +01:00
parent d684bb24b4
commit 2ce4e1ce5a
Signed by: l3d
GPG key ID: CD08445BFF4313D1
3 changed files with 31 additions and 1 deletions

View file

@ -21,7 +21,7 @@
with_items: with_items:
- "{{ etebase__global_static_root }}" - "{{ etebase__global_static_root }}"
- name: "Create mediac data directorys" - name: "Create media data directorys"
become: true become: true
ansible.builtin.file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"

27
tasks/filepermissions.yml Normal file
View file

@ -0,0 +1,27 @@
---
- name: "Make sure static data is set properly"
become: true
ansible.builtin.file:
path: "{{ item }}"
state: directory
group: "{{ etebase__group }}"
owner: "{{ etebase__user }}"
recurse: true
mode: 'u=rwX,g=rX,o=rX'
with_items:
- "{{ etebase__global_static_root }}"
- name: "Set and cleanup file permissions again"
become: true
ansible.builtin.file:
path: "{{ item }}"
state: directory
group: "{{ etebase__group }}"
owner: "{{ etebase__user }}"
recurse: true
mode: 'u=rwX,g=rX,o='
with_items:
- "{{ etebase__global_media_root }}"
- "{{ etebase__secrets_dir }}"
- "{{ etebase__venv }}"
- "{{ etebase__user_home }}/etebase_{{ etebase_version_target }}"

View file

@ -24,3 +24,6 @@
- name: Setup Systemd Service - name: Setup Systemd Service
ansible.builtin.include_tasks: systemd.yml ansible.builtin.include_tasks: systemd.yml
when: etebase__systemd_setup | bool when: etebase__systemd_setup | bool
- name: Cleanup file permissions
ansible.builtin.include_tasks: filepermissions.yml