mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2024-12-05 02:40:19 +01:00
Add advertised_address
This commit is contained in:
parent
8c0c586607
commit
c0ec5ca930
1 changed files with 18 additions and 0 deletions
|
@ -102,6 +102,24 @@
|
|||
check_mode: false
|
||||
when: k3s_control_node_address is defined
|
||||
|
||||
- name: Ensure the node registration address is defined from server node ip
|
||||
ansible.builtin.set_fact:
|
||||
k3s_registration_address: "{{ hostvars[k3s_control_delegate].k3s_server['node-ip'] }}"
|
||||
check_mode: false
|
||||
when:
|
||||
- k3s_registration_address is not defined
|
||||
- k3s_control_node_address is not defined
|
||||
- hostvars[k3s_control_delegate].k3s_server['node-ip'] is defined
|
||||
|
||||
- name: Ensure the node registration address is defined from agent node ip
|
||||
ansible.builtin.set_fact:
|
||||
k3s_registration_address: "{{ hostvars[k3s_control_delegate].k3s_agent['node-ip'] }}"
|
||||
check_mode: false
|
||||
when:
|
||||
- k3s_registration_address is not defined
|
||||
- k3s_control_node_address is not defined
|
||||
- hostvars[k3s_control_delegate].k3s_agent['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) }}"
|
||||
|
|
Loading…
Reference in a new issue