From 68bcff36f694f5af4237f146b91148b89e6d886d Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Wed, 8 Mar 2023 14:59:55 +0100 Subject: [PATCH] only try to create cluster node list when tcpping is selected --- roles/keycloak/tasks/install.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/keycloak/tasks/install.yml b/roles/keycloak/tasks/install.yml index a0b3102..35054ec 100644 --- a/roles/keycloak/tasks/install.yml +++ b/roles/keycloak/tasks/install.yml @@ -187,7 +187,7 @@ - restart keycloak when: not keycloak_remotecache.enabled or keycloak_config_override_template | length > 0 -- name: Create cluster node list +- name: Create tcpping cluster node list ansible.builtin.set_fact: keycloak_cluster_nodes: > {{ keycloak_cluster_nodes | default([]) + [ @@ -199,6 +199,7 @@ } ] }} loop: "{{ ansible_play_batch }}" + when: keycloak_ha_enabled and keycloak_ha_discovery == 'TCPPING' - name: "Deploy {{ keycloak.service_name }} config with remote cache store to {{ keycloak_config_path_to_standalone_xml }}" become: yes