diff --git a/changelogs/fragments/11309-keycloak-userprofile-selector-option.yml b/changelogs/fragments/11309-keycloak-userprofile-selector-option.yml new file mode 100644 index 0000000000..e825bbb1d8 --- /dev/null +++ b/changelogs/fragments/11309-keycloak-userprofile-selector-option.yml @@ -0,0 +1,2 @@ +minor_changes: + - keycloak_userprofile - add support for ``selector`` option (https://github.com/ansible-collections/community.general/pull/11309). \ No newline at end of file diff --git a/plugins/modules/keycloak_userprofile.py b/plugins/modules/keycloak_userprofile.py index bb620b0aed..60a8718f34 100644 --- a/plugins/modules/keycloak_userprofile.py +++ b/plugins/modules/keycloak_userprofile.py @@ -259,6 +259,18 @@ options: default: - user + selector: + description: + - Selector when the attribute should be added. + type: dict + version_added: 12.2.0 + suboptions: + scopes: + description: + - Scopes to which the attribute should be added. + type: list + elements: str + groups: description: - A list of attribute groups to be included in the User Profile. @@ -574,6 +586,7 @@ def main(): "required": dict( type="dict", options={"roles": dict(type="list", elements="str", default=["user"])} ), + "selector": dict(type="dict", options={"scopes": dict(type="list", elements="str")}), }, ), "groups": dict(