As Ansible will work with your ssh config file (~/.ssh/config), have you 
tried this:

#~/.ssh/config

Host *
  ProxyCommand sudo ssh -W %h:%p remote_proxy_system


This will proxy ALL systems via the proxy server, using the 'sudo ssh' command. 
If you don't want it to proxy everything, then you need to replace '*' with a 
space separated list of remote hosts to match.


On Tuesday, 3 February 2015 10:26:31 UTC, Ethan Zhan wrote:
>
> Hi,
>
>        I'm in trouble with how to use ansible on jumpbox, here is the 
> issue.
>
>        from jumpbox I have to use command  *sudo ssh box_ip*  to get 
> login with root permission.
>
>        How can I let ansible know to use sudo ssh instead of ssh command 
> to execute ?
>
> Thanks
> Ethan
>

-- 
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/239a5747-ac0e-4b48-9b96-ba5c059f8cb3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to