teaching-webterm/terraform/templates/inventory.ini.tmpl

41 lines
1.1 KiB
Cheetah
Raw Normal View History

2022-05-26 15:31:39 +00:00
%{ for index, instance in mongo_gateways ~}
2022-06-16 15:53:38 +00:00
${ instance.name } ansible_user=debian ansible_host=${instance.network[0].fixed_ip_v4} sshwifty_hostname=${dns_gateways[index].name}.${dns_gateways[index].zone} mongo_group_id=${instance.metadata.mongo_group_id}
2022-05-26 15:31:39 +00:00
%{ endfor ~}
%{ for index, instance in mongo_servers ~}
2022-06-16 15:53:38 +00:00
${ instance.name } ansible_user=debian ansible_host=${instance.network[0].fixed_ip_v4} mongo_group_id=${instance.metadata.mongo_group_id} mongo_group_index=${instance.metadata.mongo_group_index}
2022-05-26 15:31:39 +00:00
%{ endfor ~}
[stage_development]
[stage_testing]
[stage_production]
%{ for index, instance in mongo_gateways ~}
${ instance.name }
%{ endfor ~}
%{ for index, instance in mongo_servers ~}
${ instance.name }
%{ endfor ~}
[role_gateway]
%{ for index, instance in mongo_gateways ~}
${ instance.name }
%{ endfor ~}
[role_mongo]
%{ for index, instance in mongo_servers ~}
${ instance.name }
%{ endfor ~}
[all_groups:children]
role_gateway
role_mongo
stage_development
stage_testing
stage_production
[all:vars]
mongo_groups_count = ${ mongo_groups_count }
mongo_replicas_count = ${ mongo_replicas_count }