Allow connecting to bastion via non-standard SSH port (#7396)

* Allow connecting to bastion via non-standard port

* Fix bastion connection when ansible_port is not provided
This commit is contained in:
Kaleb Elwert
2021-03-26 00:48:43 -07:00
committed by GitHub
parent 7dec8e5caa
commit 6fa3565dac
3 changed files with 4 additions and 3 deletions

View File

@@ -15,4 +15,4 @@ Host {{ bastion_ip }}
ControlPersist 5m
Host {{ vars['hosts'] }}
ProxyCommand ssh -F /dev/null -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -W %h:%p {{ real_user }}@{{ bastion_ip }} {% if ansible_ssh_private_key_file is defined %}-i {{ ansible_ssh_private_key_file }}{% endif %}
ProxyCommand ssh -F /dev/null -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -W %h:%p -p {{ bastion_port }} {{ real_user }}@{{ bastion_ip }} {% if ansible_ssh_private_key_file is defined %}-i {{ ansible_ssh_private_key_file }}{% endif %}