serverctl/infrastructure/create-resources/templates/hosts.tftpl
kjuulh 1663a469c2
All checks were successful
continuous-integration/drone/push Build is passing
Add wireguard
2022-02-24 13:57:19 +01:00

24 lines
493 B
Plaintext

[serverctl_master_hosts]
%{ for ip in serverctl_masters ~}
${ip}
%{ endfor ~}
[serverctl_node_hosts]
%{ for ip in serverctl_nodes ~}
${ip}
%{ endfor ~}
[serverctl_mesh_nodes]
%{ for ip in serverctl_mesh_nodes ~}
${ip} ansible_host=${ip} wireguard_ip=${cidrhost("192.168.0.0/24", index(serverctl_mesh_nodes, ip) + 1)}
%{ endfor ~}
[serverctl_mesh_nodes:vars]
pipelining=true
ansible_ssh_user=root
ansible_ssh_port=22
[serverctl_cluster:children]
serverctl_master_hosts
serverctl_node_hosts