From c2f1aefaf1981a9a31efea91a896663509701279 Mon Sep 17 00:00:00 2001 From: Jeroen Hoekx Date: Tue, 24 Apr 2012 15:56:46 +0200 Subject: [PATCH] Expand user in SSH identity file. --- lib/ansible/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/connection.py b/lib/ansible/connection.py index 01bf45bbc91..85a004864c3 100644 --- a/lib/ansible/connection.py +++ b/lib/ansible/connection.py @@ -99,7 +99,7 @@ class ParamikoConnection(object): if 'user' in credentials: user = credentials['user'] if 'identityfile' in credentials: - keypair = credentials['identityfile'] + keypair = os.path.expanduser(credentials['identityfile']) ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())