Fix setting node label if kube_override_hostname is defined (#6557)

This commit is contained in:
Michal Petko 2020-08-20 15:23:30 +02:00 committed by GitHub
parent 85646c96ad
commit 91ae87fa60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,7 @@
- name: Set label to node - name: Set label to node
command: >- 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 }}" loop: "{{ role_node_labels + inventory_node_labels }}"
delegate_to: "{{ groups['kube-master'][0] }}" delegate_to: "{{ groups['kube-master'][0] }}"
changed_when: false changed_when: false