From 0620cd2e74a39e2abe2b117d85cd95946dd10cb9 Mon Sep 17 00:00:00 2001 From: Alexandr <36310479+Vespand@users.noreply.github.com> Date: Fri, 22 Apr 2022 23:31:38 +0300 Subject: [PATCH] Fix keycloak realm parameters types (#4526) * Fix keycloack realm parameters types * Add changelog fragment * Update changelog fragment Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/4526-keycloak-realm-types.yaml | 2 ++ plugins/modules/identity/keycloak/keycloak_realm.py | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/4526-keycloak-realm-types.yaml diff --git a/changelogs/fragments/4526-keycloak-realm-types.yaml b/changelogs/fragments/4526-keycloak-realm-types.yaml new file mode 100644 index 0000000000..ff1699d7f8 --- /dev/null +++ b/changelogs/fragments/4526-keycloak-realm-types.yaml @@ -0,0 +1,2 @@ +bugfixes: + - keycloak - fix parameters types for ``defaultDefaultClientScopes`` and ``defaultOptionalClientScopes`` from list of dictionaries to list of strings (https://github.com/ansible-collections/community.general/pull/4526). diff --git a/plugins/modules/identity/keycloak/keycloak_realm.py b/plugins/modules/identity/keycloak/keycloak_realm.py index 289c13504a..90b8d62a56 100644 --- a/plugins/modules/identity/keycloak/keycloak_realm.py +++ b/plugins/modules/identity/keycloak/keycloak_realm.py @@ -156,7 +156,7 @@ options: aliases: - defaultDefaultClientScopes type: list - elements: dict + elements: str default_groups: description: - The realm default groups. @@ -176,7 +176,7 @@ options: aliases: - defaultOptionalClientScopes type: list - elements: dict + elements: str default_roles: description: - The realm default roles. @@ -621,10 +621,10 @@ def main(): brute_force_protected=dict(type='bool', aliases=['bruteForceProtected']), client_authentication_flow=dict(type='str', aliases=['clientAuthenticationFlow']), client_scope_mappings=dict(type='dict', aliases=['clientScopeMappings']), - default_default_client_scopes=dict(type='list', elements='dict', aliases=['defaultDefaultClientScopes']), + default_default_client_scopes=dict(type='list', elements='str', aliases=['defaultDefaultClientScopes']), default_groups=dict(type='list', elements='dict', aliases=['defaultGroups']), default_locale=dict(type='str', aliases=['defaultLocale']), - default_optional_client_scopes=dict(type='list', elements='dict', aliases=['defaultOptionalClientScopes']), + default_optional_client_scopes=dict(type='list', elements='str', aliases=['defaultOptionalClientScopes']), default_roles=dict(type='list', elements='dict', aliases=['defaultRoles']), default_signature_algorithm=dict(type='str', aliases=['defaultSignatureAlgorithm']), direct_grant_flow=dict(type='str', aliases=['directGrantFlow']),