From c22cfa255ba47706288a469a1e9e2e5091674f23 Mon Sep 17 00:00:00 2001 From: Mohamed Mehany <7327188+mohamed-mehany@users.noreply.github.com> Date: Thu, 24 Aug 2017 17:00:45 +0300 Subject: [PATCH] Added private key file to ssh bastion conf (#1563) * Added private key file to ssh bastion conf * Used regular if condition insted of inline conditional --- 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..a6a5bc592 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 }} {% if ansible_ssh_private_key_file is defined %}-i {{ ansible_ssh_private_key_file }}{% endif %} StrictHostKeyChecking no {% endif %}