From e2a7f3e2abfdf806d2594dc5feab76c2b1c89709 Mon Sep 17 00:00:00 2001 From: Samuel Liu Date: Fri, 9 Apr 2021 03:24:02 +0800 Subject: [PATCH] remove-node roles: fix kubectl absolute path (#7469) * kubelet absolute path * kubelet absolute path --- roles/remove-node/pre-remove/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/remove-node/pre-remove/tasks/main.yml b/roles/remove-node/pre-remove/tasks/main.yml index a2e011aa267..541d1b4414f 100644 --- a/roles/remove-node/pre-remove/tasks/main.yml +++ b/roles/remove-node/pre-remove/tasks/main.yml @@ -1,6 +1,7 @@ --- - name: remove-node | List nodes - command: kubectl get nodes -o go-template={% raw %}'{{ range .items }}{{ .metadata.name }}{{ "\n" }}{{ end }}'{% endraw %} + command: >- + {{ bin_dir }}/kubectl get nodes -o go-template={% raw %}'{{ range .items }}{{ .metadata.name }}{{ "\n" }}{{ end }}'{% endraw %} register: nodes delegate_to: "{{ groups['kube_control_plane']|first }}" changed_when: false