serverctl/infrastructure/create-resources/templates/hosts.tftpl
kjuulh 9eaca5ae11
All checks were successful
continuous-integration/drone/push Build is passing
with correct variables
2022-02-24 14:10:49 +01:00

19 lines
501 B
Plaintext

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