mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
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>
28 lines
1.3 KiB
YAML
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 }}"
|