From 543e82cb9f70e138ff356ea8bed2c895767b29ae Mon Sep 17 00:00:00 2001 From: Romain Pelisse Date: Wed, 29 Dec 2021 18:30:58 +0100 Subject: [PATCH] Enhance wait message with keycloak healthcheck URL --- roles/keycloak/tasks/systemd.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/roles/keycloak/tasks/systemd.yml b/roles/keycloak/tasks/systemd.yml index 67fd2e1..5738229 100644 --- a/roles/keycloak/tasks/systemd.yml +++ b/roles/keycloak/tasks/systemd.yml @@ -56,9 +56,12 @@ - meta: flush_handlers -- name: Wait until Keycloak becomes active +- set_fact: + health_url: "{{ keycloak_management_url }}/health" + +- name: "Wait until Keycloak becomes active {{ health_url }}" uri: - url: "{{ keycloak_management_url }}/health" + url: "{{ health_url }}" register: keycloak_status until: keycloak_status.status == 200 retries: 20