AMW-612 Fix health URL duplication when hostname includes http_relative_path

Use removesuffix to strip overlapping path from hostname before
re-appending http_relative_path, preventing /auth/auth/ duplication.
Add molecule test for the relative path scenario.
This commit is contained in:
Martin Cihlar
2026-08-27 13:14:28 +02:00
parent a4cdf1b154
commit b48b0b7334
8 changed files with 128 additions and 3 deletions
+24
View File
@@ -0,0 +1,24 @@
---
- name: Verify
hosts: all
vars:
keycloak_quarkus_bootstrap_admin_password: "remembertochangeme"
keycloak_quarkus_bootstrap_admin_user: "remembertochangeme"
keycloak_uri: "http://localhost:8080/auth"
tasks:
- name: Populate service facts
ansible.builtin.service_facts:
- name: Check if keycloak service started
ansible.builtin.assert:
that:
- ansible_facts.services["keycloak.service"]["state"] == "running"
- ansible_facts.services["keycloak.service"]["status"] == "enabled"
- name: Verify openid endpoint with relative path
ansible.builtin.uri:
url: "{{ keycloak_uri }}/realms/master/.well-known/openid-configuration"
method: GET
validate_certs: no
register: keycloak_openid_response
until: keycloak_openid_response.status == 200
retries: 5
delay: 5