diff --git a/roles/bastion-ssh-config/templates/ssh-bastion.conf b/roles/bastion-ssh-config/templates/ssh-bastion.conf index ebb380665..768e7fe7a 100644 --- a/roles/bastion-ssh-config/templates/ssh-bastion.conf +++ b/roles/bastion-ssh-config/templates/ssh-bastion.conf @@ -16,6 +16,6 @@ Host {{ bastion_ip }} ControlPersist 5m Host {{ vars['hosts'] }} - ProxyCommand ssh -W %h:%p {{ real_user }}@{{ bastion_ip }} + ProxyCommand ssh -W %h:%p {{ real_user }}@{{ bastion_ip }} {{ '-i %s' %ansible_ssh_private_key_file if ansible_ssh_private_key_file is defined else ''}} StrictHostKeyChecking no {% endif %}