From c09fcd4f92fde6e24b0d39c8e44be2cfa20f46e6 Mon Sep 17 00:00:00 2001 From: Kenichi Omichi Date: Thu, 19 May 2022 01:04:07 -0700 Subject: [PATCH] Skip gathering facts when reset_nodes is false (#8843) 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 --- remove-node.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/remove-node.yml b/remove-node.yml index 4c2fe66d1..b9fdb93d6 100644 --- a/remove-node.yml +++ b/remove-node.yml @@ -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