Files
computer-playbook/roles/web-app-mediawiki/tasks/04_admin.yml
kevinveenbirkenbachandClaude Opus 4.8 cddb0dc59b feat(lint): require emoji-prefixed task/step/job names + convert existing
Add tests/lint/repository/test_name_emoji_and_length.py: every Ansible task
name and GitHub Actions workflow/job/step name must start with an emoji (first
char not 0-9/A-Za-z) and be <= 80 chars.

- emit emoji names at the source: cli/build/include generator now writes
  "🔧 setup <app>" / "🚿 flush handlers after <app>" so generated
  tasks/groups/*-roles.yml satisfy the convention too
- convert existing task/step/job/workflow names to emoji-prefixed, choosing a
  task-fitting icon per action (📦 install, ✅ ensure, 🔍 probe, 🥾 bootstrap,
  🚀 deploy, 🧩 service-module load, ⬇️ checkout, 📂 include-routines, ...)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 22:45:06 +02:00

28 lines
1.3 KiB
YAML

---
- name: "📁 Create / promote MediaWiki admin user (one-shot)"
ansible.builtin.command: >-
container run --rm
--network {{ MEDIAWIKI_NETWORK_DATABASE }}
-u {{ MEDIAWIKI_USER }}
-v {{ MEDIAWIKI_VOLUME_IMAGES }}:{{ MEDIAWIKI_HTML_DIR }}/images
-v {{ MEDIAWIKI_VOLUME_EXTENSIONS }}:{{ MEDIAWIKI_HTML_DIR }}/extensions
-v {{ MEDIAWIKI_LOCALSETTINGS_HOST_PATH }}:{{ MEDIAWIKI_LOCALSETTINGS_CONTAINER_PATH }}:ro
-v {{ MEDIAWIKI_LOCAL_MOUNT_DIR }}:{{ MEDIAWIKI_LOCAL_PATH }}:ro
{{ SWARM_REGISTRY_PREFIX }}{{ MEDIAWIKI_CUSTOM_IMAGE }}:{{ MEDIAWIKI_VERSION }}
php {{ MEDIAWIKI_HTML_DIR }}/maintenance/run.php createAndPromote
--bureaucrat --sysop
{{ MEDIAWIKI_ADMINISTRATOR_NAME }}
{{ MEDIAWIKI_ADMINISTRATOR_PASSWORD }}
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(''))))
run_once: true
delegate_to: "{{ STACK_HOST }}"
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"