serverctl/infrastructure/create-resources/templates/hosts.tftpl
kjuulh 5c9f96be8e
All checks were successful
continuous-integration/drone/push Build is passing
Add homeserver to infra
2022-02-24 21:36:07 +01:00

36 lines
886 B
Plaintext

[serverctl_master_hosts]
%{ for ip in serverctl_masters ~}
${ip} ansible_host=${ip} wireguard_ip=${cidrhost("10.1.1.0/24", index(serverctl_masters, ip) + 1)}
%{ endfor ~}
[serverctl_node_hosts]
%{ for ip in serverctl_nodes ~}
${ip} ansible_host=${ip} wireguard_ip=${cidrhost("10.1.1.0/24", index(serverctl_nodes, ip) + 10)}
%{ endfor ~}
[serverctl_home_servers]
192.168.1.150 ansible_host=192.168.1.150 wireguard_ip=10.1.1.8
#192.168.1.233 ansible_host=192.168.1.233 wireguard_ip=10.1.1.9
[serverctl_cluster:children]
serverctl_master_hosts
serverctl_node_hosts
[serverctl_super_cluster:children]
serverctl_cluster
serverctl_home_servers
[serverctl_home_servers:vars]
client_server=True
[serverctl_super_cluster:vars]
pipelining=true
ansible_ssh_user=root
ansible_ssh_port=22
[serverctl_cluster:vars]
client_server=False
pipelining=true
ansible_ssh_user=root
ansible_ssh_port=22