mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Optimized namings in moodle
This commit is contained in:
19
roles/web-app-moodle/tasks/02_ownership.yml
Normal file
19
roles/web-app-moodle/tasks/02_ownership.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
# This file sets the correct ownership rights for Moodle volumes
|
||||
|
||||
- name: Set ownership and permissions on Moodle directories
|
||||
vars:
|
||||
moodle_dirs:
|
||||
- "{{ bitnami_code_dir }}"
|
||||
- "{{ bitnami_data_dir }}"
|
||||
block:
|
||||
- name: Ensure ownership is correct
|
||||
command: "docker exec --user root {{ moodle_container }} chown -R {{ bitnami_user_group }} {{ item }}"
|
||||
loop: "{{ moodle_dirs }}"
|
||||
|
||||
- name: Set directory permissions (770)
|
||||
command: "docker exec --user root {{ moodle_container }} find {{ item }} -type d -exec chmod 770 {} \\;"
|
||||
loop: "{{ moodle_dirs }}"
|
||||
|
||||
- name: Set file permissions (660)
|
||||
command: "docker exec --user root {{ moodle_container }} find {{ item }} -type f -exec chmod 660 {} \\;"
|
||||
loop: "{{ moodle_dirs }}"
|
Reference in New Issue
Block a user