mirror of
https://github.com/PyratLabs/ansible-role-k3s.git
synced 2024-11-25 12:15:51 +01:00
Merge branch 'main' of github.com:PyratLabs/ansible-role-k3s into main
This commit is contained in:
commit
1780b5a20f
@ -102,6 +102,15 @@
|
||||
check_mode: false
|
||||
when: k3s_control_node_address is defined
|
||||
|
||||
- name: Ensure the node registration address is defined from node-ip
|
||||
ansible.builtin.set_fact:
|
||||
k3s_registration_address: "{{ hostvars[k3s_control_delegate].k3s_runtime_config['node-ip'] }}"
|
||||
check_mode: false
|
||||
when:
|
||||
- k3s_registration_address is not defined
|
||||
- k3s_control_node_address is not defined
|
||||
- hostvars[k3s_control_delegate].k3s_runtime_config['node-ip'] is defined
|
||||
|
||||
- name: Ensure the node registration address is defined
|
||||
ansible.builtin.set_fact:
|
||||
k3s_registration_address: "{{ hostvars[k3s_control_delegate].ansible_host | default(hostvars[k3s_control_delegate].ansible_fqdn) }}"
|
||||
@ -113,13 +122,6 @@
|
||||
when: k3s_registration_address is not defined
|
||||
or k3s_control_delegate is not defined
|
||||
|
||||
- name: Ensure k3s_runtime_config is set for control plane
|
||||
ansible.builtin.set_fact:
|
||||
k3s_runtime_config: "{{ (k3s_server | default({})) | combine((k3s_agent | default({}))) }}"
|
||||
when:
|
||||
- (k3s_server is defined or k3s_agent is defined)
|
||||
- (k3s_control_node is defined and k3s_control_node)
|
||||
|
||||
- name: Ensure k3s_runtime_config is set for agents
|
||||
ansible.builtin.set_fact:
|
||||
k3s_runtime_config: "{{ (k3s_agent | default({})) }}"
|
||||
|
Loading…
Reference in New Issue
Block a user