Fix primary control node delegation

This commit is contained in:
Xan Manning 2021-07-24 17:38:45 +01:00
parent e90448f40b
commit ba113bcd05

View file

@ -9,12 +9,12 @@
- name: Ensure k3s control node fact is set
ansible.builtin.set_fact:
k3s_control_node: "{{ false if k3s_build_cluster else true }}"
k3s_control_node: "{{ not k3s_build_cluster }}"
when: k3s_control_node is not defined
- name: Ensure k3s primary control node fact is set
ansible.builtin.set_fact:
k3s_primary_control_node: "{{ false if k3s_build_cluster else true }}"
k3s_primary_control_node: "{{ not k3s_build_cluster }}"
when: k3s_primary_control_node is not defined
- name: Ensure k3s control plane port is captured
@ -56,7 +56,6 @@
k3s_primary_control_node: true
when:
- k3s_controller_list is defined
- k3s_controller_list | length > 1
- inventory_hostname == k3s_controller_list[0]
- k3s_build_cluster is defined
- k3s_build_cluster