From 6f8d9f2eca3203a4e73985ca3a91ff204dc4a46e Mon Sep 17 00:00:00 2001 From: Rich Evans <86021670+ndc-rkevans@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:54:09 -0500 Subject: [PATCH] Check if widgets compiled templates directory exists and if so change owner to apache The Widgets extension has a folder named complied_templates that apache must own in order for the widgets to execute in mediawiki pages --- src/roles/mediawiki/tasks/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/roles/mediawiki/tasks/main.yml b/src/roles/mediawiki/tasks/main.yml index f05b2d03..854d47c2 100644 --- a/src/roles/mediawiki/tasks/main.yml +++ b/src/roles/mediawiki/tasks/main.yml @@ -305,6 +305,19 @@ - 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 #