Optimized namings in moodle

This commit is contained in:
2025-08-08 09:12:50 +02:00
parent 2996c7cbb6
commit 220e3e1c60
4 changed files with 7 additions and 7 deletions

View 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 }}"