From 57e12ca52223d9227058bf7bb77e7a529fc7919a Mon Sep 17 00:00:00 2001 From: Mohamed Mehany Date: Wed, 23 Aug 2017 21:12:44 +0200 Subject: [PATCH] Added private key file to ssh bastion conf --- roles/bastion-ssh-config/templates/ssh-bastion.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 %}