diff --git a/glusterfs/inventory/terraform_hosts.ini b/glusterfs/inventory/terraform_hosts.ini new file mode 100755 index 0000000..19d31c3 --- /dev/null +++ b/glusterfs/inventory/terraform_hosts.ini @@ -0,0 +1,19 @@ +# terraform/templates/inventory.yml.tftpl +# Auto-generated by Terraform - DO NOT EDIT + +[bastion] +Jumphost ansible_host="192.168.178.59" + + +[test_server] +gluster1 ansible_host="10.100.0.3" +gluster2 ansible_host="10.100.0.4" +gluster3 ansible_host="10.100.0.5" + +[all:vars] +ansible_connection=ssh +ansible_user=clusteruser +ansible_ssh_pass=password + +[test_server:vars] +ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q clusteruser@192.168.178.59"' \ No newline at end of file diff --git a/glusterfs/terraform/templates/inventory.yml.tftpl b/glusterfs/terraform/templates/inventory.yml.tftpl index 79c9733..e7177d9 100644 --- a/glusterfs/terraform/templates/inventory.yml.tftpl +++ b/glusterfs/terraform/templates/inventory.yml.tftpl @@ -1,19 +1,19 @@ # terraform/templates/inventory.yml.tftpl # Auto-generated by Terraform - DO NOT EDIT +[bastion] +${bastion.name} ansible_host="${bastion.default_ipv4_address}" + + +[test_server] +%{ for idx, server in galera_servers ~} +${server.name} ansible_host="${server.default_ipv4_address}" +%{ endfor ~} + [all:vars] ansible_connection=ssh ansible_user=clusteruser ansible_ssh_pass=password -[bastion] -${bastion.name} ansible_host: "${bastion.default_ipv4_address}" - - -[test_server] -%{ for idx, server in galera_servers ~} -${server.name} ansible_host: "${server.default_ipv4_address}" -%{ endfor ~} - [test_server:vars] ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q clusteruser@${bastion.default_ipv4_address}"' \ No newline at end of file