From f1fbdd4a6c0a6197a839191e14b7ba70f401ac5f Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 28 Dec 2025 10:00:10 +0100 Subject: [PATCH] [PR #11309/9f5114dc backport][stable-12] keycloak_userprofile: Add missing selector option (#11333) keycloak_userprofile: Add missing selector option (#11309) * Add selector option * Add fragment * Formatting (cherry picked from commit 9f5114dc766e91ab29d2507bb0542ed09e70428c) Co-authored-by: maxblome <53860633+maxblome@users.noreply.github.com> --- .../11309-keycloak-userprofile-selector-option.yml | 2 ++ plugins/modules/keycloak_userprofile.py | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 changelogs/fragments/11309-keycloak-userprofile-selector-option.yml 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(