fix(ansible): validate and expose mobile Keycloak client variables
Problem
KC_MOBILE_CLIENT_ID and KC_MOBILE_REDIRECT_SCHEME are used by keycloak-config-cli via $(env:KC_MOBILE_CLIENT_ID) in configs/keycloak/genie-realm.yaml, but:
- They were never included in the Ansible
env.j2template → absent from the generated.env - They had no validation in
deploy.yml→ deploy silently succeeds with empty values - Result: mobile OIDC client created with empty
clientIdand brokenredirectUris
Changes
- Add
kc_mobile_client_idandkc_mobile_redirect_schemeto the assert validation indeploy.yml - Add them to
templates/env.j2(no defaults — mandatory)
Test plan
-
ansible-playbook --syntax-check deploy.ymlpasses -
Deploy fails with clear error if kc_mobile_client_idorkc_mobile_redirect_schemeare missing from vault -
Deploy succeeds when both are provided -
Generated .envcontains both variables
Edited by Jérôme Revillard