I took inspiration from the FAQ 
<http://docs.ansible.com/ansible/latest/faq.html#how-do-i-configure-a-jump-host-to-access-servers-that-i-have-no-direct-access-to>which
 
describes how to use jump hosts / ssh proxies in combination with ansible 
playbooks.

In order to connect to servers I have to use a syntax like this:
ssh myuser@technicaluser@targethost@jumphost
This works fine on all of my machines and also on that where I run ansible 
from. I only need to enter the password of myuser which is just fine.

To get ansible working I created an inventory file called inventory with 
this content:
[category]
targethost ansible_user=myuser

In the host_vars of targethost I have
ansible_ssh_common_args: '-o ProxyCommand="ssh -vvvv -W %h:%p 
technicaluser@jumphost"'

Then I run 
ansible -i inventory category -m ping 

But in contrast to the regular ssh command I am being asked for the 
password of the technical user
technicaluser@jumphost's password: 

The problem with this is that by design I do not know the password of the 
technical user and therefore I am lost.

Where is my mistake ?
I am on Ansible 2.4.2.0, OpenSSH 7.4p1 and CentOS 7.4.1708

-- 
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/f5ddd507-c824-4813-add1-bdb38fed46ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to