mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-14 14:26:04 +02:00
- 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
19 lines
874 B
YAML
19 lines
874 B
YAML
- name: "Create MediaWiki admin user"
|
|
command: >
|
|
docker exec
|
|
-u {{ MEDIAWIKI_USER }}
|
|
{{ MEDIAWIKI_CONTAINER }}
|
|
php /var/www/html/maintenance/createAndPromote.php
|
|
--bureaucrat --sysop
|
|
{{ MEDIAWIKI_ADMINISTRATOR_NAME }}
|
|
{{ MEDIAWIKI_ADMINISTRATOR_PASSWORD }}
|
|
{{ MEDIAWIKI_ADMINISTRATOR_EMAIL }}
|
|
register: create_admin
|
|
changed_when: >
|
|
('created' in ((create_admin.stdout | default('')) ~ (create_admin.stderr | default('')))) or
|
|
('Created' in ((create_admin.stdout | default('')) ~ (create_admin.stderr | default(''))))
|
|
failed_when: >
|
|
create_admin.rc != 0 and
|
|
('already exists' not in ((create_admin.stdout | default('')) ~ (create_admin.stderr | default('')))) and
|
|
('Account exists' not in ((create_admin.stdout | default('')) ~ (create_admin.stderr | default(''))))
|
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}" |