Adapted proxycommand
This commit is contained in:
@@ -1,17 +1,19 @@
|
|||||||
# terraform/templates/inventory.yml.tftpl
|
# terraform/templates/inventory.yml.tftpl
|
||||||
# Auto-generated by Terraform - DO NOT EDIT
|
# Auto-generated by Terraform - DO NOT EDIT
|
||||||
all:
|
|
||||||
children:
|
[all:vars]
|
||||||
bastion:
|
ansible_connection=ssh
|
||||||
hosts:
|
ansible_user=clusteruser
|
||||||
${bastion.name}:
|
ansible_ssh_pass=password
|
||||||
ansible_host: "${bastion.default_ipv4_address}"
|
|
||||||
ansible_user: clusteruser
|
[bastion]
|
||||||
test_server:
|
${bastion.name} ansible_host: "${bastion.default_ipv4_address}"
|
||||||
hosts:
|
|
||||||
|
|
||||||
|
[test_server]
|
||||||
%{ for idx, server in galera_servers ~}
|
%{ for idx, server in galera_servers ~}
|
||||||
${server.name}:
|
${server.name} ansible_host: "${server.default_ipv4_address}"
|
||||||
ansible_host: "${server.default_ipv4_address}"
|
|
||||||
ansible_user: clusteruser
|
|
||||||
ansible_ssh_common_args: "-o ProxyJump=clusteruser@${bastion.default_ipv4_address}"
|
|
||||||
%{ endfor ~}
|
%{ endfor ~}
|
||||||
|
|
||||||
|
[test_server:vars]
|
||||||
|
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q clusteruser@${bastion.default_ipv4_address}"'
|
||||||
Reference in New Issue
Block a user