Files
computer-playbook/utils/cache/users
kevinveenbirkenbachandClaude Fable 5 6395f0b9b8 fix(keycloak-swarm): render delegated realm-user credentials + drop retry recursion
Two stacked defects broke keycloak object updates on the swarm-delegated
cross-node path:

- get_merged_users cached the templar-less raw_users payload (fetched by
  get_merged_applications) under the same key as templar-backed lookups, so
  every later lookup('users') in the process returned UNRENDERED values. The
  literal '{{ 42 | strong_password }}' / '{{ ansible_become_password }}' then
  reached kcadm and swarmkit, failing the realm password policy and the stack
  env validation. Key the cache on templar presence so rendered and raw
  payloads never share an entry.

- The cross-node recovery block re-included itself with a self-referential
  'kc_update_attempt' template var, which Ansible 2.19 expands recursively
  ('Recursive loop detected: maximum recursion depth exceeded') on the second
  attempt. Advance the counter with an eager set_fact so each level reads a
  concrete int.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 19:03:07 +02:00
..