From 7ee15f95f75ae9e9c0b592800cc2bdd299d84747 Mon Sep 17 00:00:00 2001 From: adam-cleo <90759784+adam-cleo@users.noreply.github.com> Date: Mon, 30 May 2022 12:48:06 +0200 Subject: [PATCH] keycloak_realm: fix default groups and roles (#4241) (#4719) * keycloak_realm: fix default groups and roles (#4241) * add changelog fragment --- changelogs/fragments/4719-fix-keycloak-realm.yaml | 2 ++ plugins/modules/identity/keycloak/keycloak_realm.py | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/4719-fix-keycloak-realm.yaml diff --git a/changelogs/fragments/4719-fix-keycloak-realm.yaml b/changelogs/fragments/4719-fix-keycloak-realm.yaml new file mode 100644 index 0000000000..3071756ec5 --- /dev/null +++ b/changelogs/fragments/4719-fix-keycloak-realm.yaml @@ -0,0 +1,2 @@ +bugfixes: + - "keycloak_realm - fix default groups and roles (https://github.com/ansible-collections/community.general/issues/4241)." \ No newline at end of file diff --git a/plugins/modules/identity/keycloak/keycloak_realm.py b/plugins/modules/identity/keycloak/keycloak_realm.py index 90b8d62a56..fd9f17ebf8 100644 --- a/plugins/modules/identity/keycloak/keycloak_realm.py +++ b/plugins/modules/identity/keycloak/keycloak_realm.py @@ -163,7 +163,7 @@ options: aliases: - defaultGroups type: list - elements: dict + elements: str default_locale: description: - The realm default locale. @@ -183,7 +183,7 @@ options: aliases: - defaultRoles type: list - elements: dict + elements: str default_signature_algorithm: description: - The realm default signature algorithm. @@ -622,10 +622,10 @@ def main(): client_authentication_flow=dict(type='str', aliases=['clientAuthenticationFlow']), client_scope_mappings=dict(type='dict', aliases=['clientScopeMappings']), default_default_client_scopes=dict(type='list', elements='str', aliases=['defaultDefaultClientScopes']), - default_groups=dict(type='list', elements='dict', aliases=['defaultGroups']), + default_groups=dict(type='list', elements='str', aliases=['defaultGroups']), default_locale=dict(type='str', aliases=['defaultLocale']), default_optional_client_scopes=dict(type='list', elements='str', aliases=['defaultOptionalClientScopes']), - default_roles=dict(type='list', elements='dict', aliases=['defaultRoles']), + default_roles=dict(type='list', elements='str', aliases=['defaultRoles']), default_signature_algorithm=dict(type='str', aliases=['defaultSignatureAlgorithm']), direct_grant_flow=dict(type='str', aliases=['directGrantFlow']), display_name=dict(type='str', aliases=['displayName']),