Skip to content

Commit

Permalink
Fix Widgets folder permissions tasks
Browse files Browse the repository at this point in the history
moved the 2 tasks that test for the existence of the Widgets/complied templates folder and then, if it exists, changes the permissions to apache:apache - moved them to AFTER the global permissions fix for the entire mediawiki folder

and - made the chown task recursive to apply to all the compiled templates
  • Loading branch information
ndc-rkevans authored Feb 15, 2024
1 parent 6f8d9f2 commit e3228e3
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions src/roles/mediawiki/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -305,22 +305,10 @@
- local-skins
- latest

- name: Check if the compiled_templates directory exists per the widgets extension
stat:
path: "{{ m_mediawiki }}/extensions/Widgets/compiled_templates/"
register: mw_ext_widgets_compiled_templates_folder

- name: "Ensure compiled templates folder for widget extension is ownwed by apache"
file:
path: "{{ m_mediawiki }}/extensions/Widgets/compiled_templates/"
owner: apache
group: apache
mode: "0755"
when: mw_ext_widgets_compiled_templates_folder.stat.exists

#
# LocalSettings.php
#

- name: Ensure LocalSettings.php in place
template:
src: LocalSettings.php.j2
Expand All @@ -341,9 +329,25 @@
- mediawiki-core
- file-perms

- name: Check if the compiled_templates directory exists per the widgets extension
stat:
path: "{{ m_mediawiki }}/extensions/Widgets/compiled_templates/"
register: mw_ext_widgets_compiled_templates_folder

- name: "Ensure compiled templates folder for widget extension is ownwed by apache"
file:
path: "{{ m_mediawiki }}/extensions/Widgets/compiled_templates/"
owner: apache
group: apache
mode: "0755"
state: directory
recurse: yes
when: mw_ext_widgets_compiled_templates_folder.stat.exists

#
# LANDING PAGE
#

- name: Ensure WikiBlender installed
# Ref #1149 for TMPDIR environment var
environment:
Expand Down

0 comments on commit e3228e3

Please sign in to comment.