Template preferIPv4Stack, add health check after handler
parent
3cd69821c0
commit
26be376b5c
|
@ -33,7 +33,8 @@ keycloak_http_port: 8080
|
||||||
keycloak_https_port: 8443
|
keycloak_https_port: 8443
|
||||||
keycloak_management_http_port: 9990
|
keycloak_management_http_port: 9990
|
||||||
keycloak_management_https_port: 9993
|
keycloak_management_https_port: 9993
|
||||||
keycloak_java_opts: "-Xms1024m -Xmx20480m -XX:MaxPermSize=768m"
|
keycloak_java_opts: "-Xms1024m -Xmx2048m"
|
||||||
|
keycloak_prefer_ipv4: True
|
||||||
|
|
||||||
### Enable configuration for database backend, clustering and remote caches on infinispan
|
### Enable configuration for database backend, clustering and remote caches on infinispan
|
||||||
keycloak_ha_enabled: False
|
keycloak_ha_enabled: False
|
||||||
|
|
|
@ -27,9 +27,16 @@
|
||||||
args:
|
args:
|
||||||
argv:
|
argv:
|
||||||
- "{{ keycloak_jboss_home }}/bin/add-user-keycloak.sh"
|
- "{{ keycloak_jboss_home }}/bin/add-user-keycloak.sh"
|
||||||
- -rmaster
|
- "-rmaster"
|
||||||
- -u{{ keycloak_admin_user }}
|
- "-u{{ keycloak_admin_user }}"
|
||||||
- -p{{ keycloak_admin_password }}
|
- "-p{{ keycloak_admin_password }}"
|
||||||
become: yes
|
become: yes
|
||||||
- name: restart keycloak
|
- name: restart keycloak
|
||||||
include_tasks: tasks/restart_keycloak.yml
|
include_tasks: tasks/restart_keycloak.yml
|
||||||
|
- name: "Wait until Keycloak becomes active {{ health_url }}"
|
||||||
|
uri:
|
||||||
|
url: "{{ health_url }}"
|
||||||
|
register: keycloak_status
|
||||||
|
until: keycloak_status.status == 200
|
||||||
|
retries: 25
|
||||||
|
delay: 10
|
||||||
|
|
|
@ -82,7 +82,7 @@ startKeycloak() {
|
||||||
-Djboss.management.http.port=${KEYCLOAK_MANAGEMENT_HTTP_PORT} \
|
-Djboss.management.http.port=${KEYCLOAK_MANAGEMENT_HTTP_PORT} \
|
||||||
-Djboss.management.https.port=${KEYCLOAK_MANAGEMENT_HTTPS_PORT} \
|
-Djboss.management.https.port=${KEYCLOAK_MANAGEMENT_HTTPS_PORT} \
|
||||||
-Djboss.node.name={{ inventory_hostname }} \
|
-Djboss.node.name={{ inventory_hostname }} \
|
||||||
{% if ansible_facts.virtualization_type in ['docker','oci','containerd'] %}-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true {% endif %}\
|
{% if keycloak_prefer_ipv4 %}-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true {% endif %}\
|
||||||
{% if keycloak_config_standalone_xml is defined %}--server-config={{ keycloak_config_standalone_xml }}{% endif %} \
|
{% if keycloak_config_standalone_xml is defined %}--server-config={{ keycloak_config_standalone_xml }}{% endif %} \
|
||||||
2>&1 >> "${KEYCLOAK_LOGFILE}" &
|
2>&1 >> "${KEYCLOAK_LOGFILE}" &
|
||||||
while [ ! -f ${KEYCLOAK_PIDFILE} ]; do sleep 1; done
|
while [ ! -f ${KEYCLOAK_PIDFILE} ]; do sleep 1; done
|
||||||
|
|
Loading…
Reference in New Issue