Skip to content

Instantly share code, notes, and snippets.

@mohsen0
Created April 26, 2018 08:15
Show Gist options
  • Save mohsen0/2db5b1c2089c219841d060519cf780dc to your computer and use it in GitHub Desktop.
Save mohsen0/2db5b1c2089c219841d060519cf780dc to your computer and use it in GitHub Desktop.
Ansible ssh connection through jump box with timeout set and sharing connection for the whole run
[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=60m -o ControlPath=./%r@%h:%p -o ServerAliveInterval=60 -o ServerAliveCountMax=10 -o USER=centos -o ProxyCommand="ssh -o ControlMaster=auto -o ControlPersist=60s -o ServerAliveInterval=60 -o ServerAliveCountMax=10 -o ConnectTimeout=60 -q -W %h:%p centos@jump-box"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment