mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-11 02:25:36 +00:00
use keycloak_client_rolescope as basis
This commit is contained in:
parent
cfcae5331c
commit
ac232e2980
2 changed files with 15 additions and 36 deletions
|
|
@ -1,14 +1,23 @@
|
|||
# Copyright (c) 2022, Dušan Marković (@bratwurzt)
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
- name: Wait for Keycloak
|
||||
uri:
|
||||
url: "{{ url }}/admin/"
|
||||
status_code: 200
|
||||
validate_certs: false
|
||||
register: result
|
||||
until: result.status == 200
|
||||
retries: 10
|
||||
delay: 10
|
||||
|
||||
- name: Delete realm
|
||||
- name: Delete realm if exists
|
||||
community.general.keycloak_realm:
|
||||
auth_keycloak_url: "{{ url }}"
|
||||
auth_realm: "{{ admin_realm }}"
|
||||
auth_username: "{{ admin_user }}"
|
||||
auth_password: "{{ admin_password }}"
|
||||
id: "{{ realm }}"
|
||||
realm: "{{ realm }}"
|
||||
state: absent
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
# Copyright (c) 2022, Dušan Marković (@bratwurzt)
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
url: http://localhost:8080/auth
|
||||
|
|
@ -8,38 +8,8 @@ admin_realm: master
|
|||
admin_user: admin
|
||||
admin_password: password
|
||||
realm: myrealm
|
||||
client_id: myclient
|
||||
role: myrole
|
||||
description_1: desc 1
|
||||
description_2: desc 2
|
||||
|
||||
keycloak_username: test
|
||||
keycloak_service_account_client_id: "{{ client_id }}"
|
||||
keycloak_user_realm_roles:
|
||||
- name: offline_access
|
||||
- name: "{{ role }}"
|
||||
keycloak_client_role: test
|
||||
keycloak_user_client_roles:
|
||||
- client_id: "{{ client_id }}"
|
||||
roles:
|
||||
- name: "{{ keycloak_client_role }}"
|
||||
- client_id: "{{ realm }}-realm"
|
||||
roles:
|
||||
- name: view-users
|
||||
- name: query-users
|
||||
keycloak_user_attributes:
|
||||
- name: attr1
|
||||
values:
|
||||
- value1s
|
||||
state: present
|
||||
- name: attr2
|
||||
values:
|
||||
- value2s
|
||||
state: present
|
||||
- name: attr3
|
||||
values:
|
||||
- value3s
|
||||
state: present
|
||||
keycloak_user_groups:
|
||||
- name: test
|
||||
state: present
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue