Skip to content

Commit

Permalink
Merge pull request #171 from guidograzioli/170_quarkus_java_home_typo
Browse files Browse the repository at this point in the history
keycloak_quarkus: fix custom JAVA_HOME parameter name
  • Loading branch information
guidograzioli authored Feb 27, 2024
2 parents beee25d + d97ddbd commit 33a839f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions molecule/https_revproxy/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
ansible.builtin.file:
path: /etc/nginx/tls
state: directory
mode: 0755
- name: Copy certificates
ansible.builtin.copy:
src: "{{ item.name }}"
Expand Down
1 change: 1 addition & 0 deletions molecule/quarkus-devmode/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
keycloak_quarkus_frontend_url: 'http://localhost:8080/'
keycloak_quarkus_start_dev: True
keycloak_quarkus_proxy_mode: none
keycloak_quarkus_java_home: /opt/openjdk/
roles:
- role: keycloak_quarkus
- role: keycloak_realm
Expand Down
11 changes: 10 additions & 1 deletion molecule/quarkus-devmode/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@
tasks:
- name: Install sudo
ansible.builtin.yum:
name: sudo
name:
- sudo
- java-17-openjdk-headless
state: present

- name: Link default logs directory
ansible.builtin.file:
state: link
src: /usr/lib/jvm/jre-17-openjdk
dest: /opt/openjdk
force: true

- name: "Display hera_home if defined."
ansible.builtin.set_fact:
hera_home: "{{ lookup('env', 'HERA_HOME') }}"
8 changes: 8 additions & 0 deletions molecule/quarkus-devmode/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
- ansible_facts.services["keycloak.service"]["state"] == "running"
- ansible_facts.services["keycloak.service"]["status"] == "enabled"

- name: Verify we are running on requested JAVA_HOME # noqa blocked_modules command-instead-of-module
ansible.builtin.shell: |
set -o pipefail
ps -ef | grep '/opt/openjdk' | grep -v grep
args:
executable: /bin/bash
changed_when: False

- name: Set internal envvar
ansible.builtin.set_fact:
hera_home: "{{ lookup('env', 'HERA_HOME') }}"
Expand Down
6 changes: 3 additions & 3 deletions roles/keycloak_quarkus/templates/keycloak-sysconfig.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# {{ ansible_managed }}
KEYCLOAK_ADMIN={{ keycloak_quarkus_admin_user }}
KEYCLOAK_ADMIN_PASSWORD='{{ keycloak_quarkus_admin_pass }}'
PATH={{ keycloak_java_home | default(keycloak_rpm_java_home, true) }}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
JAVA_HOME={{ keycloak_java_home | default(keycloak_rpm_java_home, true) }}
JAVA_OPTS_APPEND={{ keycloak_quarkus_java_opts }}
PATH={{ keycloak_quarkus_java_home | default(keycloak_rpm_java_home, true) }}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
JAVA_HOME={{ keycloak_quarkus_java_home | default(keycloak_rpm_java_home, true) }}
JAVA_OPTS_APPEND={{ keycloak_quarkus_java_opts }}

0 comments on commit 33a839f

Please sign in to comment.