cleanup
parent
9304b78a8a
commit
df8a544a3a
@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Print client {{ client_id }} for realm {{ realm_name }}
|
|
||||||
debug:
|
|
||||||
msg: "{{ lookup('template','keycloak-realm-create-client.json.j2') }}"
|
|
||||||
delegate_to: 127.0.0.1
|
|
||||||
become: false
|
|
||||||
when:
|
|
||||||
- debug
|
|
||||||
|
|
||||||
- name: "Creating client <{{ client_id }}> for realm <{{ realm_name }}>"
|
|
||||||
uri:
|
|
||||||
url: "{{ keycloak_server_url }}/auth/admin/realms/{{ realm_name }}/clients"
|
|
||||||
method: POST
|
|
||||||
body_format: json
|
|
||||||
body: "{{ lookup('template','keycloak-realm-create-client.json.j2') }}"
|
|
||||||
headers:
|
|
||||||
Authorization: "Bearer {{ access_token }} "
|
|
||||||
status_code: [201]
|
|
||||||
changed_when: True
|
|
||||||
when: realm_client_ids | selectattr('clientId', 'equalto', client_id) | list | length == 0
|
|
||||||
delegate_to: 127.0.0.1
|
|
||||||
become: false
|
|
||||||
Loading…
Reference in New Issue