MediaWiki: runtime patch for LocalSettings.php (URL, DB, lang) + safe quoting

- Add 03_patch_settings.yml to sync $wgServer/$wgCanonicalServer, DB vars, and language
- Use single-quoted PHP strings with proper escaping; idempotent grep guards
- Wire task into main.yml; rename 03_admin→04_admin and 04_extensions→05_extensions

Ref: https://chatgpt.com/share/68c3649a-e830-800f-a059-fc8eda8f76bb
This commit is contained in:
2025-09-12 02:09:33 +02:00
parent a0c2245bbd
commit 57ca6adaec
4 changed files with 70 additions and 2 deletions

View File

@@ -22,11 +22,14 @@
require_path: "{{ MEDIAWIKI_LOCAL_PATH }}/debug.php"
when: MODE_DEBUG | bool
- name: "MEDIAWIKI | Sync LocalSettings.php with Ansible vars"
include_tasks: 03_patch_settings.yml
- name: "Load admin setup procedures for '{{ application_id }}''"
include_tasks: 03_admin.yml
include_tasks: 04_admin.yml
- name: "Load extensions procedures for '{{ application_id }}''"
include_tasks: "04_extensions.yml"
include_tasks: "05_extensions.yml"
when: MEDIAWIKI_OIDC_ENABLED | bool
- name: "OIDC | Ensure require_once(oidc.php) present"