only try to create cluster node list when tcpping is selected

This commit is contained in:
Guido Grazioli 2023-03-08 14:59:55 +01:00
parent a7c9304c68
commit 68bcff36f6
No known key found for this signature in database
GPG key ID: 22C8C31EF2BC093B

View file

@ -187,7 +187,7 @@
- restart keycloak - restart keycloak
when: not keycloak_remotecache.enabled or keycloak_config_override_template | length > 0 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: ansible.builtin.set_fact:
keycloak_cluster_nodes: > keycloak_cluster_nodes: >
{{ keycloak_cluster_nodes | default([]) + [ {{ keycloak_cluster_nodes | default([]) + [
@ -199,6 +199,7 @@
} }
] }} ] }}
loop: "{{ ansible_play_batch }}" 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 }}" - name: "Deploy {{ keycloak.service_name }} config with remote cache store to {{ keycloak_config_path_to_standalone_xml }}"
become: yes become: yes