Skip to content

Commit

Permalink
Fix setting node label if kube_override_hostname is defined (kubernet…
Browse files Browse the repository at this point in the history
  • Loading branch information
miso231 authored and LuckySB committed Jan 10, 2021
1 parent cb7bc67 commit f0b6dda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/kubernetes/node-label/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,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
Expand Down

0 comments on commit f0b6dda

Please sign in to comment.