Browse Source

Fix path for calico get node names (#1816)

pull/1818/merge
Matthew Mosesohn 7 years ago
committed by GitHub
parent
commit
d4b10eb9f5
1 changed files with 3 additions and 2 deletions
  1. 5
      roles/network_plugin/calico/tasks/main.yml

5
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

Loading…
Cancel
Save