ansible-middleware/keycloak

Providers add to script

Closed this issue · 0 comments

Hi Team,

thank you for great ansible for keycloak. I wonder if you are planing to add that would b possible during installation add providers or themes to keycloak?
I'm interested in providers because I'm deploying keycloak cluster to AWS and there I have to install few providers and also change HA settings.
And also we are using PrivacyIDEA keycloak plugin.
Another think is we are using mysql would be possible to add not that is hard to add but it is handy if would be there already.

I modify my script and add extra task for providers

  • name: Include binaries for providers
    when: keycloak_quarkus_providers is defined
    ansible.builtin.include_tasks: providers.yml
    register: keycloak_provides
    tags:
    • providers

and task to for build

  • name: Building Keycloak
    when: keycloak_provides is defined
    ansible.builtin.command: "{{ keycloak.home }}/bin/kc.sh build"
    changed_when: False
    become: yes
    notify:
    • restart keycloak

providers.yml

  • name: Download JAR files for providers
    get_url:
    url: "{{ item }}"
    dest: "{{ keycloak_quarkus_providers_dir }}{{ item | regex_replace('.+/(\w+-\d+\.\d+\.\d+\.jar)', '\1') }}"
    loop: "{{ keycloak_quarkus_providers }}"

And for AWS deployment I modify cache-ispn.xml.

I did very simple but probably you can do better than me, because my knowledge is very basic for ansible and keycloak.
Hope not asking to much. thanks and keep doing good work.
Ales