From d4b10eb9f52632249bece0c49b8861f8c16ade6b Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Tue, 17 Oct 2017 10:54:48 +0100 Subject: [PATCH] Fix path for calico get node names (#1816) --- roles/network_plugin/calico/tasks/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/network_plugin/calico/tasks/main.yml b/roles/network_plugin/calico/tasks/main.yml index f1fdbab21..15ab5f660 100644 --- a/roles/network_plugin/calico/tasks/main.yml +++ b/roles/network_plugin/calico/tasks/main.yml @@ -8,9 +8,10 @@ - name: Calico | Get kubelet hostname shell: >- - kubectl get node -o custom-columns='NAME:.metadata.name,INTERNAL-IP:.status.addresses[?(@.type=="InternalIP")].address' - | egrep "[[:space:]]{{ ansible_all_ipv4_addresses | join('[[:space:]]|[[:space:]]') }}[[:space:]]*$" | cut -d" " -f1 + {{ bin_dir }}/kubectl get node -o custom-columns='NAME:.metadata.name,INTERNAL-IP:.status.addresses[?(@.type=="InternalIP")].address' + | egrep "{{ ansible_all_ipv4_addresses | join('$|') }}$" | cut -d" " -f1 register: calico_kubelet_name + delegate_to: "{{ groups['kube-master'][0] }}" when: cloud_provider is defined - name: Calico | Write Calico cni config