Fix keycloak client module

This commit is contained in:
Harsha Cherukuri
2026-06-10 08:22:52 -04:00
parent 0fad56294b
commit c8bcff39ef
2 changed files with 3 additions and 3 deletions

View File

@@ -299,7 +299,7 @@
- name: keycloak_client_rolescope — restrict realm role on client - name: keycloak_client_rolescope — restrict realm role on client
middleware_automation.keycloak.keycloak_client_rolescope: middleware_automation.keycloak.keycloak_client_rolescope:
realm: "{{ target_realm }}" realm: "{{ target_realm }}"
client_id: "{{ client }}" target_client_id: "{{ client }}"
role_names: role_names:
- "{{ role }}" - "{{ role }}"
state: present state: present
@@ -537,7 +537,7 @@
- name: keycloak_client_rolescope — remove role scope mapping - name: keycloak_client_rolescope — remove role scope mapping
middleware_automation.keycloak.keycloak_client_rolescope: middleware_automation.keycloak.keycloak_client_rolescope:
realm: "{{ target_realm }}" realm: "{{ target_realm }}"
client_id: "{{ client }}" target_client_id: "{{ client }}"
role_names: role_names:
- "{{ role }}" - "{{ role }}"
state: absent state: absent

View File

@@ -198,7 +198,7 @@ def main():
if not objRealm: if not objRealm:
module.fail_json(msg=f"Failed to retrive realm '{realm}'") module.fail_json(msg=f"Failed to retrive realm '{realm}'")
objClient = kc.get_client_by_target_client_id(target_client_id, realm) objClient = kc.get_client_by_client_id(target_client_id, realm)
if not objClient: if not objClient:
module.fail_json(msg=f"Failed to retrive client '{realm}.{target_client_id}'") module.fail_json(msg=f"Failed to retrive client '{realm}.{target_client_id}'")
if objClient["fullScopeAllowed"] and state == "present": if objClient["fullScopeAllowed"] and state == "present":