2018-03-05 07:02:47 +00:00
|
|
|
---
|
2021-11-08 10:22:58 +00:00
|
|
|
- name: Delete node
|
2020-07-13 14:18:40 +00:00
|
|
|
command: "{{ bin_dir }}/kubectl delete node {{ kube_override_hostname|default(inventory_hostname) }}"
|
2021-03-24 00:26:05 +00:00
|
|
|
delegate_to: "{{ groups['kube_control_plane']|first }}"
|
2021-11-08 10:22:58 +00:00
|
|
|
when: inventory_hostname in groups['k8s_cluster']
|
|
|
|
retries: 10
|
|
|
|
# Sometimes the api-server can have a short window of indisponibility when we delete a master node
|
|
|
|
delay: 3
|
|
|
|
register: result
|
|
|
|
until: result is not failed
|