set java-17 for keycloak_quarkus

This commit is contained in:
Guido Grazioli 2023-07-31 10:29:28 +02:00
parent ea735ea79e
commit 84d6e7baca
4 changed files with 14 additions and 20 deletions

View file

@ -19,6 +19,10 @@ jobs:
strategy: strategy:
matrix: matrix:
python_version: ["3.11"] python_version: ["3.11"]
molecule_test:
- default
- quarkus
- overridexml
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -67,7 +71,7 @@ jobs:
working-directory: ./ansible_collections/middleware_automation/keycloak working-directory: ./ansible_collections/middleware_automation/keycloak
- name: Run molecule test - name: Run molecule test
run: molecule test --all run: molecule test -s ${{ matrix.molecule_test }}
working-directory: ./ansible_collections/middleware_automation/keycloak working-directory: ./ansible_collections/middleware_automation/keycloak
env: env:
PY_COLORS: '1' PY_COLORS: '1'

View file

@ -10,14 +10,9 @@
notify: notify:
- restart keycloak - restart keycloak
- name: Determine JAVA_HOME for selected JVM RPM # noqa blocked_modules - name: Determine JAVA_HOME for selected JVM RPM
ansible.builtin.shell: | ansible.builtin.set_fact:
set -o pipefail rpm_java_home: "/etc/alternatives/jre_{{ keycloak_jvm_package | regex_search('(?<=java-)[0-9.]+') }}"
rpm -ql {{ keycloak_jvm_package }} | grep -Po '/usr/lib/jvm/.*(?=/bin/java$)'
args:
executable: /bin/bash
changed_when: False
register: rpm_java_home
- name: "Configure sysconfig file for {{ keycloak.service_name }} service" - name: "Configure sysconfig file for {{ keycloak.service_name }} service"
become: yes become: yes
@ -28,7 +23,7 @@
group: root group: root
mode: 0644 mode: 0644
vars: vars:
keycloak_rpm_java_home: "{{ rpm_java_home.stdout }}" keycloak_rpm_java_home: "{{ rpm_java_home }}"
notify: notify:
- restart keycloak - restart keycloak

View file

@ -9,7 +9,7 @@ keycloak_quarkus_installdir: "{{ keycloak_quarkus_dest }}/keycloak-{{ keycloak_q
keycloak_quarkus_offline_install: False keycloak_quarkus_offline_install: False
### Install location and service settings ### Install location and service settings
keycloak_quarkus_jvm_package: java-11-openjdk-headless keycloak_quarkus_jvm_package: java-17-openjdk-headless
keycloak_quarkus_java_home: keycloak_quarkus_java_home:
keycloak_quarkus_dest: /opt/keycloak keycloak_quarkus_dest: /opt/keycloak
keycloak_quarkus_home: "{{ keycloak_quarkus_installdir }}" keycloak_quarkus_home: "{{ keycloak_quarkus_installdir }}"

View file

@ -1,12 +1,7 @@
--- ---
- name: Determine JAVA_HOME for selected JVM RPM # noqa blocked_modules - name: Determine JAVA_HOME for selected JVM RPM
ansible.builtin.shell: | ansible.builtin.set_fact:
set -o pipefail rpm_java_home: "/etc/alternatives/jre_{{ keycloak_quarkus_jvm_package | regex_search('(?<=java-)[0-9.]+') }}"
rpm -ql {{ keycloak_quarkus_jvm_package }} | grep -Po '/usr/lib/jvm/.*(?=/bin/java$)'
args:
executable: /bin/bash
changed_when: False
register: rpm_java_home
- name: "Configure sysconfig file for keycloak service" - name: "Configure sysconfig file for keycloak service"
become: yes become: yes
@ -17,7 +12,7 @@
group: root group: root
mode: 0644 mode: 0644
vars: vars:
keycloak_rpm_java_home: "{{ rpm_java_home.stdout }}" keycloak_rpm_java_home: "{{ rpm_java_home }}"
notify: notify:
- restart keycloak - restart keycloak