blob: 0a9e3025a773a5e107ab81b5671c55e3ac0c96ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#set ip_settings={}
#for k,v in $getVar('ip_settings', {}).items()
#set host_ip_settings={}
#for intf in v
#set $host_ip_settings[$intf["alias"]]=intf
#end for
#set $ip_settings[$k]=$host_ip_settings
#end for
# localhost
127.0.0.1 localhost
#set kube_masters = $getVar('kube_master', [])
#set kube_nodes = $getVar('kube_node', [])
#if not $isinstance($kube_masters, list)
#set kube_masters = [$kube_masters]
#end if
#if not $isinstance($kube_nodes, list)
#set kube_nodes = [$kube_nodes]
#end if
# kube_master
#for worker in $kube_masters
#set worker_hostname = $worker.hostname
#set worker_ip = $ip_settings[$worker_hostname].mgmt.ip
$worker_ip $worker_hostname
#end for
# kube_node
#for worker in $kube_nodes
#set worker_hostname = $worker.hostname
#set worker_ip = $ip_settings[$worker_hostname].mgmt.ip
$worker_ip $worker_hostname
#end for
|