From 708dcf9fe8389bcb100c98d8c8d443f9e559174c Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sat, 23 Apr 2022 08:49:38 +0200 Subject: [PATCH] Fix keycloak realm parameters types (#4526) (#4559) * Fix keycloack realm parameters types * Add changelog fragment * Update changelog fragment Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein (cherry picked from commit 0620cd2e74a39e2abe2b117d85cd95946dd10cb9) Co-authored-by: Alexandr <36310479+Vespand@users.noreply.github.com> --- 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 da37fa2723..d07e0fc723 100644 --- a/plugins/modules/identity/keycloak/keycloak_realm.py +++ b/plugins/modules/identity/keycloak/keycloak_realm.py @@ -155,7 +155,7 @@ options: aliases: - defaultDefaultClientScopes type: list - elements: dict + elements: str default_groups: description: - The realm default groups. @@ -175,7 +175,7 @@ options: aliases: - defaultOptionalClientScopes type: list - elements: dict + elements: str default_roles: description: - The realm default roles. @@ -618,10 +618,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']),