mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-07-31 00:51:34 -07:00
Comprehensive linter warning fixes
This commit is contained in:
parent
d17c364257
commit
1f910bd400
17 changed files with 62 additions and 41 deletions
|
@ -26,14 +26,14 @@ keycloak_admin_password: ''
|
|||
# and users is a list of account, see below for the format definition
|
||||
# an empty name will skip the creation of the client
|
||||
#
|
||||
#keycloak_clients:
|
||||
# - name: ''
|
||||
# roles: "{{ keycloak_client_default_roles }}"
|
||||
# realm: "{{ keycloak_realm }}"
|
||||
# public_client: "{{ keycloak_client_public }}"
|
||||
# web_origins: "{{ keycloak_client_web_origins }}"
|
||||
# redirect_uris: "{{ keycloak_client_redirect_uris }}"
|
||||
# users: "{{ keycloak_client_users }}"
|
||||
# keycloak_clients:
|
||||
# - name: ''
|
||||
# roles: "{{ keycloak_client_default_roles }}"
|
||||
# realm: "{{ keycloak_realm }}"
|
||||
# public_client: "{{ keycloak_client_public }}"
|
||||
# web_origins: "{{ keycloak_client_web_origins }}"
|
||||
# redirect_uris: "{{ keycloak_client_redirect_uris }}"
|
||||
# users: "{{ keycloak_client_users }}"
|
||||
keycloak_clients: []
|
||||
|
||||
# list of roles to create in the client
|
||||
|
|
|
@ -10,7 +10,7 @@ argument_specs:
|
|||
# line 5 of keycloak_realm/defaults/main.yml
|
||||
default: "/auth"
|
||||
description: "Context path for rest calls"
|
||||
type: "str"
|
||||
type: "str"
|
||||
keycloak_http_port:
|
||||
# line 4 of keycloak_realm/defaults/main.yml
|
||||
default: 8080
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
loop: "{{ client.users | flatten }}"
|
||||
loop_control:
|
||||
loop_var: user
|
||||
when: "'client_roles' in user"
|
||||
when: "'client_roles' in user"
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
|
||||
- name: Check if Mapping is available
|
||||
ansible.builtin.uri:
|
||||
url: "{{ keycloak_url }}{{ keycloak_context }}/admin/realms/{{ client_role.realm | default(keycloak_realm) }}/users/{{ (keycloak_user.json | first).id }}/role-mappings/clients/{{ (create_client_result.results | selectattr('end_state.clientId', 'equalto', client_role.client) | list | first).end_state.id }}/available"
|
||||
url: "{{ keycloak_url }}{{ keycloak_context }}/admin/realms/{{ client_role.realm | \
|
||||
default(keycloak_realm) }}/users/{{ (keycloak_user.json | first).id }}/role-mappings/clients/{{ (create_client_result.results | \
|
||||
selectattr('end_state.clientId', 'equalto', client_role.client) | list | first).end_state.id }}/available"
|
||||
method: GET
|
||||
status_code:
|
||||
- 200
|
||||
|
@ -23,7 +25,9 @@
|
|||
|
||||
- name: "Create Role Mapping"
|
||||
ansible.builtin.uri:
|
||||
url: "{{ keycloak_url }}{{ keycloak_context }}/admin/realms/{{ client_role.realm | default(keycloak_realm) }}/users/{{ (keycloak_user.json | first).id }}/role-mappings/clients/{{ (create_client_result.results | selectattr('end_state.clientId', 'equalto', client_role.client) | list | first).end_state.id }}"
|
||||
url: "{{ keycloak_url }}{{ keycloak_context }}/admin/realms/{{ client_role.realm | \
|
||||
default(keycloak_realm) }}/users/{{ (keycloak_user.json | first).id }}/role-mappings/clients/{{ (create_client_result.results | \
|
||||
selectattr('end_state.clientId', 'equalto', client_role.client) | list | first).end_state.id }}"
|
||||
method: POST
|
||||
body:
|
||||
- id: "{{ item.id }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue