molecule: fix quarkus_flags role lookup and keycloak.conf path

The quarkus_flags scenario added in #445 is the only role-based
scenario without the roles -> ../../roles symlink, so in CI its
converge stops with "the role 'keycloak_quarkus' was not found".

Once the role is found, verify fails next: it reads
/opt/keycloak/keycloak-26.7.3/conf/keycloak.conf, but the scenario
installs the role's default version, which is no longer 26.7.3.

Add the roles symlink the other scenarios use and read keycloak.conf
through the /opt/keycloak/keycloak-*/ glob already used in
molecule/quarkus/verify.yml, so the check does not depend on the
installed version. The assertions are unchanged.
This commit is contained in:
Stefan Krempel
2026-11-20 13:10:15 +01:00
parent 901c21e87e
commit 33e7ed3a7e
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -0,0 +1 @@
../../roles
+3 -3
View File
@@ -12,8 +12,8 @@
- ansible_facts.services["keycloak.service"]["status"] == "enabled" - ansible_facts.services["keycloak.service"]["status"] == "enabled"
- name: Read keycloak.conf - name: Read keycloak.conf
ansible.builtin.slurp: ansible.builtin.shell: cat /opt/keycloak/keycloak-*/conf/keycloak.conf
src: /opt/keycloak/keycloak-26.7.3/conf/keycloak.conf changed_when: false
register: keycloak_conf register: keycloak_conf
- name: Verify toggled flags in keycloak.conf - name: Verify toggled flags in keycloak.conf
@@ -25,7 +25,7 @@
- "'health-enabled=false' in keycloak_conf_content" - "'health-enabled=false' in keycloak_conf_content"
- "'hostname-backchannel-dynamic=true' in keycloak_conf_content" - "'hostname-backchannel-dynamic=true' in keycloak_conf_content"
vars: vars:
keycloak_conf_content: "{{ keycloak_conf.content | b64decode }}" keycloak_conf_content: "{{ keycloak_conf.stdout }}"
- name: Read sysconfig - name: Read sysconfig
ansible.builtin.slurp: ansible.builtin.slurp: