Skip to content

Commit

Permalink
Skip gathering facts when reset_nodes is false (kubernetes-sigs#8843)
Browse files Browse the repository at this point in the history
The doc[1] explains we need to specify

  "-e reset_nodes=false -e allow_ungraceful_removal=true"

to delete offline node. However the task "Gather facts"
tried to gather facts of offline node also and the task
was failed.
This adds a condition to skip gathering facts when reset_nodes
is false on remove-node.yml.

[1]: https://github.com/kubernetes-sigs/kubespray/blob/master/docs/nodes.md#3-remove-an-old-node-with-remove-nodeyml
  • Loading branch information
oomichi authored and LuckySB committed Oct 23, 2023
1 parent b174bb3 commit 05b8b63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions remove-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

- name: Gather facts
import_playbook: facts.yml
when: reset_nodes|default(True)|bool

- hosts: "{{ node | default('kube_node') }}"
gather_facts: no
Expand Down

0 comments on commit 05b8b63

Please sign in to comment.