Ansible when using the openssh connection plugin (-c ssh, the default on
everything but RHEL/CentOS) will use your ~/.ssh/config automatically, and
follow any ProxyCommand directives you have setup therein.

This would be your best option.

To keep everything in source control, consider checking in an ansible.cfg
that specifies the SSH config file in the SSH options section, and also
check in that SSH config file.



On Fri, May 23, 2014 at 10:11 AM, Slim Slam <[email protected]> wrote:

> Suppose your inventory file looks like the following.
> You have three clusters of machines (clusterONE, clusterTWO,
> clusterTHREE). Each cluster has
> a bastion host (bastionONE, bastionTWO, bastionTHREE) that you must SSH
> into in order to access other machines
> in the cluster.
>
> What are you options as far as configuring Ansible and SSH to manage these
> three clusters? Is it possible
> to keep all of the SSH configuration in source code control?
>
> Sample inventory file:
>
> [clusterONE]
> bastionONE
> 158.235.223.213
> 198.107.146.229
> 176.13.38.205
> 175.254.141.60
> 85.59.14.45
> 176.20.118.235
>
> [clusterTWO]
> bastionTWO
> c2mach1
> c2mach2
> c2mach3
> 187.77.198.80
> 4.120.171.38
> 186.236.248.11
>
> [clusterTHREE]
> bastionTHREE
> 24.2.218.10
> 60.167.213.218
> 148.182.176.91
> 34.67.66.210
> 102.47.60.38
> 182.26.160.12
> 85.174.57.108
>
> ============================
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/ecf0d8aa-3515-400c-b50b-faadc9a93089%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/ecf0d8aa-3515-400c-b50b-faadc9a93089%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgxwo8At7-%2BbkLEU%3D_B%2BqL_3W6z3Mg3uVP4HnNHNpRPERA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to