-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhosts.tftpl
54 lines (45 loc) · 1.21 KB
/
hosts.tftpl
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
[all]
%{ for ip in masters ~}
master-${index(masters, ip) + 1} ansible_host=${ip[1]} ip=${ip[0]} etcd_member_name=etcd-${index(masters, ip) + 1}
%{ endfor ~}
%{ for ip in workers ~}
worker-${index(workers, ip) + 1} ansible_host=${ip[1]} ip=${ip[0]}
%{ endfor ~}
%{ for ip in ingress ~}
ingress-${index(ingress, ip) + 1} ansible_host=${ip[1]} ip=${ip[0]}
%{ endfor ~}
[kube_control_plane]
%{ for ip in masters ~}
master-${index(masters, ip) + 1}
%{ endfor ~}
[etcd]
%{ for ip in masters ~}
master-${index(masters, ip) + 1}
%{ endfor ~}
[kube_node]
%{ for ip in workers ~}
worker-${index(workers, ip) + 1}
%{ endfor ~}
%{ for ip in ingress ~}
ingress-${index(ingress, ip) + 1}
%{ endfor ~}
[kube_worker]
%{ for ip in workers ~}
worker-${index(workers, ip) + 1}
%{ endfor ~}
[kube_ingress]
%{ for ip in ingress ~}
ingress-${index(ingress, ip) + 1}
%{ endfor ~}
[calico_rr]
[k8s_cluster:children]
kube_control_plane
kube_node
calico_rr
[all:vars]
supplementary_addresses_in_ssl_keys='[%{ for ip in masters ~} "${ip[1]}",%{ endfor ~}]'
ansible_connection=ssh
ansible_user=root
ansible_ssh_private_key_file=/root/.ssh/id_ed25519
ansible_python_interpreter=/usr/bin/python3
ansible_ssh_common_args='-o StrictHostKeyChecking=accept-new'