fgci-org / fgci-ansible

:microscope: Collection of the Finnish Grid and Cloud Infrastructure Ansible playbooks
MIT License
54 stars 18 forks source link

Define bastion host ssh settings in inventory file #145

Open martbhell opened 8 years ago

martbhell commented 8 years ago

It would be cool if one could put the host definitions and possible bastion hosts in between as well. One can use the variable ansible_ssh_common_args for this. Basically for fgci-ansible this means mostly a documentation change - in the examples/hosts-example file and guides.

Maybe something like this (untested) 1:

[machine_c]
10.0.0.5

[private_machines]
machine_c

[private_machines:vars]
ansible_ssh_common_args: "-o 'ProxyCommand ssh -W %h:%p machine_b'"