2018-08-23 14:17:18 +00:00
|
|
|
---
|
2020-09-03 06:55:40 +00:00
|
|
|
- name: Calico | Get kubelet hostname
|
2018-08-23 14:17:18 +00:00
|
|
|
shell: >-
|
2020-09-03 06:55:40 +00:00
|
|
|
set -o pipefail && {{ bin_dir }}/kubectl get node -o custom-columns='NAME:.metadata.name,INTERNAL-IP:.status.addresses[?(@.type=="InternalIP")].address'
|
2018-08-23 14:17:18 +00:00
|
|
|
| egrep "{{ ansible_all_ipv4_addresses | join('$|') }}$" | cut -d" " -f1
|
2020-09-03 06:55:40 +00:00
|
|
|
args:
|
|
|
|
executable: /bin/bash
|
2018-08-23 14:17:18 +00:00
|
|
|
register: calico_kubelet_name
|
|
|
|
delegate_to: "{{ groups['kube-master'][0] }}"
|
|
|
|
when:
|
2019-04-19 13:01:54 +00:00
|
|
|
- "cloud_provider is defined"
|