Allow to specify ansible_ssh_private_key_file location related to user home directory

This commit is contained in:
Aleksey Ovcharenko 2013-11-22 01:47:03 +02:00
parent b11f96eaa4
commit 2222f6df58
2 changed files with 3 additions and 3 deletions

View file

@ -79,7 +79,7 @@ class ActionModule(object):
if not dest_host is src_host:
user = inject.get('ansible_ssh_user',
self.runner.remote_user)
private_key = inject.get('ansible_ssh_private_key_file', self.runner.private_key_file)
private_key = os.path.expanduser(inject.get('ansible_ssh_private_key_file', self.runner.private_key_file))
if not private_key is None:
options['private_key'] = private_key
src = self._process_origin(src_host, src, user)