mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
Add tests/lint/repository/test_task_file_numbering.py: numbered task files use exactly two leading digits, a numbered *_core.yml must be 00_core.yml, per directory the numbers are unique/consecutive and start at 01 (00 with a core file), numbered includes appear in ascending order, and shared helpers live in tasks/utils/ instead of the numbered chain. Apply it across every role: rename NN_core.yml to 00_core.yml with a consecutive down-shift of the siblings, move letter-suffix children into a subdirectory named after their parent task, relocate helpers included from more than one place into tasks/utils/, and update every reference (include_tasks, path_absolute, .ansible-lint-ignore, requirement docs). Legacy narration comments in the touched files are deleted; the upstream xwiki.properties reference block opts out via nocheck. The unused MAILU_IP6_PUBLIC var (only ever named in now-removed comments) is dropped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
---
|
|
- name: "🔍 Resolve reserved usernames for '{{ application_id }}' at task runtime"
|
|
set_fact:
|
|
KEYCLOAK_RESERVED_USERNAMES_LIST: "{{ lookup('users') | reserved_usernames }}"
|
|
KEYCLOAK_RESERVED_USERNAMES_REGEX: >-
|
|
{{ (lookup('users') | reserved_usernames) | join('|') }}
|
|
|
|
- name: "📄 Render Keycloak realm dictionary for '{{ application_id }}' at task runtime"
|
|
set_fact:
|
|
KEYCLOAK_DICTIONARY_REALM_RAW: "{{ lookup('template', 'import/realm.json.j2') }}"
|
|
|
|
- name: "🔎 Parse Keycloak realm dictionary for '{{ application_id }}'"
|
|
set_fact:
|
|
KEYCLOAK_DICTIONARY_REALM: >-
|
|
{{
|
|
KEYCLOAK_DICTIONARY_REALM_RAW
|
|
if (KEYCLOAK_DICTIONARY_REALM_RAW is mapping)
|
|
else (KEYCLOAK_DICTIONARY_REALM_RAW | from_json)
|
|
}}
|
|
|
|
- name: "📤 Extract Keycloak user profile payload for '{{ application_id }}'"
|
|
set_fact:
|
|
KEYCLOAK_USER_PROFILE_OBJECT: >-
|
|
{{
|
|
(
|
|
KEYCLOAK_DICTIONARY_REALM.components['org.keycloak.userprofile.UserProfileProvider']
|
|
| first
|
|
)['config']['kc.user.profile.config'][0]
|
|
| from_json
|
|
}}
|
|
|
|
- name: "🔨 Build Keycloak user profile config payload for '{{ application_id }}'"
|
|
set_fact:
|
|
KEYCLOAK_USER_PROFILE_CONFIG_PAYLOAD: >-
|
|
{{
|
|
{
|
|
'config': {
|
|
'kc.user.profile.config': [
|
|
KEYCLOAK_USER_PROFILE_OBJECT | to_json
|
|
]
|
|
}
|
|
}
|
|
}}
|
|
|
|
- name: "📁 create directory {{ KEYCLOAK_REALM_IMPORT_DIR_HOST }}"
|
|
file:
|
|
path: "{{ KEYCLOAK_REALM_IMPORT_DIR_HOST }}"
|
|
state: directory
|
|
mode: "0755"
|
|
|
|
- name: "📋 Copy REALM import file to '{{ KEYCLOAK_REALM_IMPORT_FILE_DST }}'"
|
|
stack_host_template:
|
|
src: "{{ KEYCLOAK_REALM_IMPORT_FILE_SRC }}"
|
|
dest: "{{ KEYCLOAK_REALM_IMPORT_FILE_DST }}"
|
|
mode: "0770"
|
|
when: KEYCLOAK_REALM_IMPORT_ENABLED | bool
|