Fix setting node label if kube_override_hostname is defined (#6557)
This commit is contained in:
parent
85646c96ad
commit
91ae87fa60
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@
|
|||
|
||||
- name: Set label to node
|
||||
command: >-
|
||||
{{ bin_dir }}/kubectl label node {{ inventory_hostname }} {{ item }} --overwrite=true
|
||||
{{ bin_dir }}/kubectl label node {{ kube_override_hostname | default(inventory_hostname) }} {{ item }} --overwrite=true
|
||||
loop: "{{ role_node_labels + inventory_node_labels }}"
|
||||
delegate_to: "{{ groups['kube-master'][0] }}"
|
||||
changed_when: false
|
||||
|
|
Loading…
Reference in a new issue