From 26ef1eb531c0e8c2a7392c2fe68e4ff2f0c2d54b Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Tue, 14 Dec 2021 14:25:01 +0100 Subject: [PATCH] add preferIPv4addresses to java_opts --- molecule/default/molecule.yml | 2 -- roles/keycloak/templates/keycloak-service.sh.j2 | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 1b3efda..fdafef5 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -13,8 +13,6 @@ platforms: - "8080/tcp" - "8443/tcp" - "8009/tcp" - published_ports: - - 0.0.0.0:8443:8443/TCP provisioner: name: ansible config_options: diff --git a/roles/keycloak/templates/keycloak-service.sh.j2 b/roles/keycloak/templates/keycloak-service.sh.j2 index 9db7d5a..d5d3457 100755 --- a/roles/keycloak/templates/keycloak-service.sh.j2 +++ b/roles/keycloak/templates/keycloak-service.sh.j2 @@ -81,7 +81,7 @@ startKeycloak() { -Djboss.https.port=${KEYCLOAK_HTTPS_PORT} \ -Djboss.management.http.port=${KEYCLOAK_MANAGEMENT_HTTP_PORT} \ -Djboss.management.https.port=${KEYCLOAK_MANAGEMENT_HTTPS_PORT} \ - -Djboss.node.name={{ inventory_hostname }} {% if ansible_facts.virtualization_type in ['docker','oci'] %}-Djava.net.preferIPv4Stack=true {% endif %}\ + -Djboss.node.name={{ inventory_hostname }} {% if ansible_facts.virtualization_type in ['docker','oci'] %}-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true {% endif %}\ 2>&1 >> "${KEYCLOAK_LOGFILE}" & echo "${!}" > "${KEYCLOAK_PIDFILE}" fi