From 9cef20187c3b1689a2e5a246fe36b8e6571a6280 Mon Sep 17 00:00:00 2001
From: mauromedda <medda.mauro@gmail.com>
Date: Sun, 12 Aug 2018 10:50:50 +0200
Subject: [PATCH] Add the path to kubectl binary

The post-remove action fails during the kubectl delete node action because with rc: 2, command not found. The kubectl is not in the system PATH and the full path to the binary is required
---
 roles/remove-node/post-remove/tasks/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/roles/remove-node/post-remove/tasks/main.yml b/roles/remove-node/post-remove/tasks/main.yml
index 8017e85e2..b820bff09 100644
--- a/roles/remove-node/post-remove/tasks/main.yml
+++ b/roles/remove-node/post-remove/tasks/main.yml
@@ -1,7 +1,7 @@
 ---
 
 - name: Delete node
-  command: kubectl delete node {{ item }}
+  command: "{{ bin_dir}}/kubectl delete node {{ item }}"
   with_items:
     - "{{ node.split(',') | default(groups['kube-node']) }}"
   delegate_to: "{{ groups['kube-master']|first }}"
-- 
GitLab