2018-03-05 15:02:47 +08:00
|
|
|
---
|
2021-11-08 18:22:58 +08:00
|
|
|
- name: Delete node
|
2022-01-05 18:26:32 +08:00
|
|
|
command: "{{ kubectl }} delete node {{ kube_override_hostname|default(inventory_hostname) }}"
|
2021-03-24 08:26:05 +08:00
|
|
|
delegate_to: "{{ groups['kube_control_plane']|first }}"
|
2021-11-08 18:22:58 +08: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
|