mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-01-12 02:20:01 -03:30
* project: fix ansible-lint name Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: ignore jinja template error in names Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: capitalize ansible name Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: update notify after name capitalization Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> --------- Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
14 lines
653 B
YAML
14 lines
653 B
YAML
---
|
|
- name: Remove-node | Delete node
|
|
command: "{{ kubectl }} delete node {{ kube_override_hostname | default(inventory_hostname) }}"
|
|
delegate_to: "{{ groups['kube_control_plane'] | first }}"
|
|
when:
|
|
- groups['kube_control_plane'] | length > 0
|
|
# ignore servers that are not nodes
|
|
- inventory_hostname in groups['k8s_cluster'] and kube_override_hostname | default(inventory_hostname) in nodes.stdout_lines
|
|
retries: "{{ delete_node_retries }}"
|
|
# Sometimes the api-server can have a short window of indisponibility when we delete a master node
|
|
delay: "{{ delete_node_delay_seconds }}"
|
|
register: result
|
|
until: result is not failed
|