serverctl/infrastructure/create-resources/templates/hosts.tftpl

36 lines
886 B
Plaintext
Raw Normal View History

2022-02-24 13:57:19 +01:00
[serverctl_master_hosts]
%{ for ip in serverctl_masters ~}
2022-02-24 21:36:07 +01:00
${ip} ansible_host=${ip} wireguard_ip=${cidrhost("10.1.1.0/24", index(serverctl_masters, ip) + 1)}
2022-02-24 13:57:19 +01:00
%{ endfor ~}
[serverctl_node_hosts]
%{ for ip in serverctl_nodes ~}
2022-02-24 21:36:07 +01:00
${ip} ansible_host=${ip} wireguard_ip=${cidrhost("10.1.1.0/24", index(serverctl_nodes, ip) + 10)}
2022-02-24 13:57:19 +01:00
%{ endfor ~}
2022-02-24 21:36:07 +01:00
[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
2022-02-24 13:57:19 +01:00
[serverctl_cluster:children]
serverctl_master_hosts
serverctl_node_hosts
2022-02-24 14:09:13 +01:00
2022-02-24 21:36:07 +01:00
[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
2022-02-24 14:09:13 +01:00
[serverctl_cluster:vars]
2022-02-24 21:36:07 +01:00
client_server=False
2022-02-24 14:09:13 +01:00
pipelining=true
ansible_ssh_user=root
ansible_ssh_port=22