mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2025-01-19 07:50:17 +01:00
Fix node registration ip on dual stack (#230)
When using a user defined node ip on a dual stack cluster, k3s_node_ip will contain "ipv4,ipv6" IP. In order to properly set the registration IP, the first (preferred) IP in the list is used, and if it is the IPv6 IP it will be URL wrapped.
This commit is contained in:
parent
6ff67804dd
commit
9247de3920
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@
|
|||
|
||||
- name: Ensure the node registration address is defined from node-ip
|
||||
ansible.builtin.set_fact:
|
||||
k3s_registration_address: "{{ hostvars[k3s_control_delegate].k3s_node_ip }}"
|
||||
k3s_registration_address: "{{ (hostvars[k3s_control_delegate].k3s_node_ip | split(','))[0] | ipwrap }}"
|
||||
check_mode: false
|
||||
when:
|
||||
- k3s_registration_address is not defined
|
||||
|
|
Loading…
Reference in a new issue