mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
[PR #10953/258e65f5 backport][stable-11] keycloak_user_rolemapping: docs fixes and examples about mapping realm roles in keycloak_user_rolemapping (#10963)
keycloak_user_rolemapping: docs fixes and examples about mapping realm roles in keycloak_user_rolemapping (#10953)
* Fix docs and add examples about mapping realm roles for keycloak_user_rolemapping.py module (#7149)
* fix sanity tests
(cherry picked from commit 258e65f5fc)
Co-authored-by: Stanislav Shamilov <shamilovstas@protonmail.com>
This commit is contained in:
parent
31f130a56f
commit
6cf8ce06ca
1 changed files with 21 additions and 2 deletions
|
|
@ -72,15 +72,17 @@ options:
|
|||
client_id:
|
||||
type: str
|
||||
description:
|
||||
- Name of the client to be mapped (different than O(cid)).
|
||||
- Name of the client (different than O(cid)) whose role is to be mapped.
|
||||
- This parameter is required if O(cid) is not provided (can be replaced by O(cid) to reduce the number of API calls
|
||||
that must be made).
|
||||
- If neither O(cid) nor O(client_id) is specified, a B(realm) role is mapped instead.
|
||||
cid:
|
||||
type: str
|
||||
description:
|
||||
- ID of the client to be mapped.
|
||||
- ID of the client whose role is to be mapped.
|
||||
- This parameter is not required for updating or deleting the rolemapping but providing it reduces the number of API
|
||||
calls required.
|
||||
- If neither O(cid) nor O(client_id) is specified, a B(realm) role is mapped instead.
|
||||
roles:
|
||||
description:
|
||||
- Roles to be mapped to the user.
|
||||
|
|
@ -108,6 +110,23 @@ author:
|
|||
"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
- name: Map a realm role to a user, authentication with credentials
|
||||
community.general.keycloak_user_rolemapping:
|
||||
realm: MyCustomRealm
|
||||
auth_client_id: admin-cli
|
||||
auth_keycloak_url: https://auth.example.com/auth
|
||||
auth_realm: master
|
||||
auth_username: USERNAME
|
||||
auth_password: PASSWORD
|
||||
state: present
|
||||
user_id: user1Id
|
||||
roles:
|
||||
- name: role_name1
|
||||
id: role_id1
|
||||
- name: role_name2
|
||||
id: role_id2
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Map a client role to a user, authentication with credentials
|
||||
community.general.keycloak_user_rolemapping:
|
||||
realm: MyCustomRealm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue