Skip to content

Commit

Permalink
Merge pull request #6 from ansible-middleware/keycloak_update_15_0_2
Browse files Browse the repository at this point in the history
Keycloak update 15 0 2
  • Loading branch information
guidograzioli authored Jan 14, 2022
2 parents 5fa9243 + d4634fc commit ff77535
Show file tree
Hide file tree
Showing 11 changed files with 578 additions and 560 deletions.
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependency:
name: shell
command: ansible-galaxy collection install -r molecule/default/requirements.yml -p $HOME/.ansible/collections --force-with-deps
driver:
name: podman
name: docker
platforms:
- name: instance
image: registry.access.redhat.com/ubi8/ubi-init:latest
Expand Down
2 changes: 2 additions & 0 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
tasks:
- name: Disable beta repos
command: yum config-manager --disable '*beta*'
ignore_errors: yes

- name: Install sudo
yum:
name: sudo
Expand Down
8 changes: 8 additions & 0 deletions roles/keycloak/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ This role requires the `python3-netaddr` library installed on the controller nod
* or via pip: `pip install netaddr==0.8.0`


Versions
--------

| RH-SSO VERSION | Release Date | Keycloak Version | EAP Version | Notes |
|:---------------|:------------------|:-----------------|:------------|:----------------|
|`7.5.0 GA` |September 20, 2021 |`15.0.2` | `7.4.0` |[Release Notes](https://access.redhat.com/documentation/en-us/red_hat_single_sign-on/7.5/html/release_notes/index)|


Role Defaults
-------------

Expand Down
9 changes: 5 additions & 4 deletions roles/keycloak/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
### Configuration specific to keycloak
keycloak_version: 9.0.2
keycloak_archive: keycloak-{{ keycloak_version }}.zip
keycloak_download_url: https://downloads.jboss.org/keycloak/{{ keycloak_version }}/{{ keycloak_archive }}
keycloak_version: 15.0.2
keycloak_archive: "keycloak-{{ keycloak_version }}.zip"
keycloak_download_url: "https://github.com/keycloak/keycloak/releases/download/{{ keycloak_version }}/{{ keycloak_archive }}"
keycloak_download_url_9x: "https://downloads.jboss.org/keycloak/{{ keycloak_version }}/{{ keycloak_archive }}"
keycloak_installdir: "{{ keycloak_dest }}/keycloak-{{ keycloak_version }}"

### Configuration specific to Red Hat Single Sing-On
keycloak_rhsso_enable: "{{ True if rhsso_rhn_id is defined else False }}"
keycloak_rhsso_version: 7.5
keycloak_rhsso_archive: rh-sso-{{ keycloak_rhsso_version }}-server-dist.zip
keycloak_rhsso_archive: "rh-sso-{{ keycloak_rhsso_version }}-server-dist.zip"
keycloak_rhsso_installdir: "{{ keycloak_dest }}/rh-sso-{{ keycloak_rhsso_version }}"
keycloak_rhsso_base_url: 'https://access.redhat.com/jbossnetwork/restricted/softwareDownload.html?softwareId='

Expand Down
4 changes: 2 additions & 2 deletions roles/keycloak/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
- name: "Deploy Keycloak's standalone.xml"
become: yes
template:
src: "{{ 'templates/standalone-rhsso.xml.j2' if keycloak_rhsso_enable else 'templates/standalone.xml.j2' }}"
src: templates/standalone.xml.j2
dest: "{{ keycloak_config_path_to_standalone_xml }}"
owner: "{{ keycloak_service_user }}"
group: "{{ keycloak_service_group }}"
Expand All @@ -141,7 +141,7 @@
- name: "Deploy Keycloak's standalone.xml with remote cache store"
become: yes
template:
src: "{{ 'templates/standalone-rhsso-jdg.xml.j2' if keycloak_rhsso_enable else 'templates/standalone-infinispan.xml.j2' }}"
src: templates/standalone-infinispan.xml.j2
dest: "{{ keycloak_config_path_to_standalone_xml }}"
owner: "{{ keycloak_service_user }}"
group: "{{ keycloak_service_group }}"
Expand Down
12 changes: 10 additions & 2 deletions roles/keycloak/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@
tags:
- prereqs

- include_tasks: tasks/install.yml
- name: Include install tasks
include_tasks: tasks/install.yml

- include_tasks: tasks/systemd.yml
- name: Include systemd tasks
include_tasks: tasks/systemd.yml

- name: Link default logs directory
file:
state: link
src: "{{keycloak_jboss_home}}/standalone/log"
dest: /var/log/keycloak

- block:
- name: Check admin credentials by generating a token
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions roles/keycloak/templates/keycloak-service.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ startKeycloak() {
-Djboss.management.https.port=${KEYCLOAK_MANAGEMENT_HTTPS_PORT} \
-Djboss.node.name={{ inventory_hostname }} \
{% if keycloak_prefer_ipv4 %}-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true {% endif %}\
{% if keycloak_config_standalone_xml is defined %}--server-config={{ keycloak_config_standalone_xml }}{% endif %} \
2>&1 >> "${KEYCLOAK_LOGFILE}" &
{% if keycloak_config_standalone_xml is defined %}--server-config={{ keycloak_config_standalone_xml }}{% endif %} &
while [ ! -f ${KEYCLOAK_PIDFILE} ]; do sleep 1; done
fi
}
Expand Down
122 changes: 56 additions & 66 deletions roles/keycloak/templates/standalone-infinispan.xml.j2

Large diffs are not rendered by default.

427 changes: 220 additions & 207 deletions roles/keycloak/templates/standalone.xml.j2

Large diffs are not rendered by default.

0 comments on commit ff77535

Please sign in to comment.