Navigation
AnsibleUpdated July 3, 2026

Ansible Tips and Tricks

ansibletips-tricksssh-proxyjump-boxdmz-accessautomationconfigurationworkarounds

Ansible Tricks

Using an SSH Proxy

The following is a simple yml Inventory file which has a Variable set for the host to use a proxy for ssh. The host in this case is a Jump Box, used to access a controlled DMZ apsrp040706.uhc.com. The hostname is CL1-dev-rhel-ctc-fs001.uhc.com here as this is the Alias that Omni prefers to call this host. The user here is a Known-Good user that is deployed and managed for Ansible Automations omnians1

proxy: apsrp04076.uhc.com

CL1-dev-rhel-ctc-fs001.uhc.com:
  vars:
    ansible_ssh_common_args: '-o ProxyCommand="ssh -p 22 -W %h:%p -q [email protected]"'

shout out to Jeff Geerling for the hot tip