mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-07-29 08:01:33 -07:00
Providers config and custom providers
This commit is contained in:
parent
a33393a477
commit
43b9ffcb64
7 changed files with 75 additions and 0 deletions
|
@ -164,3 +164,15 @@
|
|||
when:
|
||||
- rhbk_enable is defined and rhbk_enable
|
||||
- keycloak_quarkus_default_jdbc[keycloak_quarkus_jdbc_engine].driver_jar_url is defined
|
||||
|
||||
- name: "Download custom providers"
|
||||
ansible.builtin.get_url:
|
||||
url: "{{ item.url }}"
|
||||
dest: "{{ keycloak.home }}/providers/{{ item.id }}.jar"
|
||||
owner: "{{ keycloak.service_user }}"
|
||||
group: "{{ keycloak.service_group }}"
|
||||
mode: '0640'
|
||||
become: true
|
||||
loop: "{{ keycloak_quarkus_providers }}"
|
||||
when: item.url is defined and item.url | length > 0
|
||||
notify: "{{ ['rebuild keycloak config', 'restart keycloak'] if not item.restart is defined or not item.restart else [] }}"
|
||||
|
|
|
@ -56,3 +56,12 @@
|
|||
when: keytool_check.rc != 0
|
||||
ansible.builtin.fail:
|
||||
msg: "keytool NOT found in the PATH, but is required for setting up the configuration key store"
|
||||
|
||||
- name: "Validate providers"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- item.id is defined and item.id | length > 0
|
||||
- (item.spi is defined and item.spi | length > 0) or (item.url is defined and item.url | length > 0)
|
||||
quiet: true
|
||||
fail_msg: "Providers definition is incorrect; `id` and one of `spi` or `url` are mandatory. `key` and `value` are mandatory for each property"
|
||||
loop: "{{ keycloak_quarkus_providers }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue