c12s-kubespray/roles/remove-node/post-remove/tasks/main.yml
Max Gautier cb54eb40ce
Use a variable for standardizing kubectl invocation (#8329)
* Add kubectl variable

* Replace kubectl usage by kubectl variable in roles

* Remove redundant --kubeconfig on kubectl usage

* Replace unecessary shell usage with command
2022-01-05 02:26:32 -08:00

10 lines
405 B
YAML

---
- name: Delete node
command: "{{ kubectl }} delete node {{ kube_override_hostname|default(inventory_hostname) }}"
delegate_to: "{{ groups['kube_control_plane']|first }}"
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