AMW-641 Fix health check URL to use localhost instead of public hostname

Replace hostname-based health check URL with localhost. The health check
runs on the managed host itself, so it should always target localhost
rather than the public-facing keycloak_quarkus_hostname which can be
empty or a domain name behind a load balancer.

Compose the URL directly from existing production variables
(keycloak_quarkus_http_enabled, keycloak_quarkus_http_port,
keycloak_quarkus_https_port, keycloak_quarkus_http_relative_path)
without introducing intermediate variables.

Add .config/molecule/config.yml with shared molecule settings and a new
quarkus_nohost test scenario that verifies the role works when
keycloak_quarkus_hostname is left at its default empty value.

Fixes #428
This commit is contained in:
Martin Cihlar
2026-10-05 15:24:02 +02:00
parent 221b1a7667
commit 3e82ac6461
8 changed files with 108 additions and 7 deletions
@@ -50,8 +50,12 @@ https-trust-store-password={{ keycloak_quarkus_https_trust_store_password }}
{% endif %}
# Client URL configuration
{% if keycloak_quarkus_hostname | length > 0 %}
hostname={{ keycloak_quarkus_hostname }}
{% endif %}
{% if keycloak_quarkus_hostname_admin | length > 0 %}
hostname-admin={{ keycloak_quarkus_hostname_admin }}
{% endif %}
hostname-strict={{ keycloak_quarkus_hostname_strict | lower }}
hostname-backchannel-dynamic={{ keycloak_quarkus_hostname_backchannel_dynamic | lower }}