From e3228e3c6bad04d34b6314a8d934fac25960ceec Mon Sep 17 00:00:00 2001 From: Rich Evans <86021670+ndc-rkevans@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:50:19 -0500 Subject: [PATCH] Fix Widgets folder permissions tasks 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 --- src/roles/mediawiki/tasks/main.yml | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/roles/mediawiki/tasks/main.yml b/src/roles/mediawiki/tasks/main.yml index 854d47c2..cbaedfce 100644 --- a/src/roles/mediawiki/tasks/main.yml +++ b/src/roles/mediawiki/tasks/main.yml @@ -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 @@ -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: