From 60900719822435ea11ac700bda387b3186d04efc Mon Sep 17 00:00:00 2001 From: Xan Manning Date: Mon, 25 May 2020 17:57:43 +0100 Subject: [PATCH] Bugfix, issue with HA build for joining new nodes --- tasks/build/preconfigure-k3s.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasks/build/preconfigure-k3s.yml b/tasks/build/preconfigure-k3s.yml index 16b9b77..f75b1a9 100644 --- a/tasks/build/preconfigure-k3s.yml +++ b/tasks/build/preconfigure-k3s.yml @@ -59,8 +59,12 @@ - name: Ensure control node is delegated to for obtaining a token set_fact: k3s_control_delegate: "{{ k3s_control_delegate_raw.stdout.split(' @@@ ')[0] }}" + when: k3s_control_delegate is not defined - name: Ensure the control node address is registered in Ansible set_fact: k3s_control_node_address: "{{ hostvars[k3s_control_delegate].ansible_host | default(hostvars[k3s_control_delegate].ansible_fqdn) }}" + when: k3s_control_node_address is not defined + when: k3s_control_node_address is not defined + or k3s_control_delegate is not defined