diff --git a/roles/upgrade/post-upgrade/tasks/main.yml b/roles/upgrade/post-upgrade/tasks/main.yml index bff9983ff..c32f42491 100644 --- a/roles/upgrade/post-upgrade/tasks/main.yml +++ b/roles/upgrade/post-upgrade/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Uncordon node - command: "{{ bin_dir }}/kubectl uncordon {{ ansible_hostname }}" + command: "{{ bin_dir }}/kubectl uncordon {{ inventory_hostname }}" delegate_to: "{{ groups['kube-master'][0] }}" when: needs_cordoning|default(false) diff --git a/roles/upgrade/pre-upgrade/tasks/main.yml b/roles/upgrade/pre-upgrade/tasks/main.yml index f2251375b..a2b34927f 100644 --- a/roles/upgrade/pre-upgrade/tasks/main.yml +++ b/roles/upgrade/pre-upgrade/tasks/main.yml @@ -14,7 +14,7 @@ {% endif %} - name: Cordon node - command: "{{ bin_dir }}/kubectl cordon {{ ansible_hostname }}" + command: "{{ bin_dir }}/kubectl cordon {{ inventory_hostname }}" delegate_to: "{{ groups['kube-master'][0] }}" when: needs_cordoning @@ -25,6 +25,6 @@ --ignore-daemonsets --grace-period {{ drain_grace_period }} --timeout {{ drain_timeout }} - --delete-local-data {{ ansible_hostname }} + --delete-local-data {{ inventory_hostname }} delegate_to: "{{ groups['kube-master'][0] }}" when: needs_cordoning diff --git a/upgrade-cluster.yml b/upgrade-cluster.yml index 8ff4ad4b8..0b4613820 100644 --- a/upgrade-cluster.yml +++ b/upgrade-cluster.yml @@ -67,7 +67,6 @@ - { role: kubernetes/node, tags: node } - { role: kubernetes/master, tags: master } - { role: network_plugin, tags: network } - - { role: upgrade/post-upgrade, tags: post-upgrade } #Finally handle worker upgrades, based on given batch size - hosts: kube-node:!kube-master