inventory hostname for cordoning/uncordoning
parent
11c774b04f
commit
56b86bbfca
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue