Hi Ansiblers,

I have an Ansible controller machine that contains my playbooks, custom 
libraries, key files etc.
I have an inventory of host machines and CentOS VM's that run on these host 
machines. The VMs aren't directly accessible from the Ansible box. To get 
to each VM manually, I need to ssh into each host machine and then ssh into 
the specific VM.

While in a shell on the Ansible machine, I can reach the VM's by using: ssh 
-o "ForwardAgent=yes" -tt [email protected] ssh [email protected]
I.e. the chain of access is *Ansible-machine --> dom0 --> vm*

I'd like to specify the VMs in my inventory file - but unsure what all 
things need to be set in ansible.cfg, ~/.ssh/config etc.

*Inventory:*
[dom0-host]
56.66.3.10

[dom0-host:vars]
ansible_ssh_user=king
ansible_ssh_private_key_file=/home/ansible_user/.ssh/dom0_id_rsa.private_key

[redis-vm]
*# Can only access this from dom0-host*
10.0.0.1 ansible_ssh_user=redis_user ansible_ssh_pass="reallybadidea"

[web-vm]
*# Can only access this from dom0-host*
10.0.0.2 ansible_ssh_user=redis_user ansible_ssh_pass="anotherbadidea"


I tried googling around, but couldn't find a summary of the steps that 
would allow me to do this. I'm hoping this is possible and that someone can 
enumerate the steps here.

Many thanks!
Ananda

-- 
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/f8ba7c92-c4f9-4092-8d73-403ac10b8b2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to