diff --git a/changelogs/fragments/3231-fix-keycloak-realm-events.yml b/changelogs/fragments/3231-fix-keycloak-realm-events.yml new file mode 100644 index 0000000000..9950ed2c59 --- /dev/null +++ b/changelogs/fragments/3231-fix-keycloak-realm-events.yml @@ -0,0 +1,5 @@ +bugfixes: + - keycloak_realm - element type for ``events_listeners`` parameter should be ``string`` instead of ``dict`` (https://github.com/ansible-collections/community.general/pull/3231). +minor_changes: + - keycloak_realm - add ``events_enabled`` parameter to allow activation or deactivation of login events (https://github.com/ansible-collections/community.general/pull/3231). + \ 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 95f79704ef..da37fa2723 100644 --- a/plugins/modules/identity/keycloak/keycloak_realm.py +++ b/plugins/modules/identity/keycloak/keycloak_realm.py @@ -242,6 +242,13 @@ options: - enabledEventTypes type: list elements: str + events_enabled: + description: + - Enables or disables login events for this realm. + aliases: + - eventsEnabled + type: bool + version_added: 3.6.0 events_expiration: description: - The realm events expiration. @@ -254,7 +261,7 @@ options: aliases: - eventsListeners type: list - elements: dict + elements: str failure_factor: description: - The realm failure factor. @@ -626,8 +633,9 @@ def main(): email_theme=dict(type='str', aliases=['emailTheme']), enabled=dict(type='bool'), enabled_event_types=dict(type='list', elements='str', aliases=['enabledEventTypes']), + events_enabled=dict(type='bool', aliases=['eventsEnabled']), events_expiration=dict(type='int', aliases=['eventsExpiration']), - events_listeners=dict(type='list', elements='dict', aliases=['eventsListeners']), + events_listeners=dict(type='list', elements='str', aliases=['eventsListeners']), failure_factor=dict(type='int', aliases=['failureFactor']), internationalization_enabled=dict(type='bool', aliases=['internationalizationEnabled']), login_theme=dict(type='str', aliases=['loginTheme']),