mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
Allow to specify ansible_ssh_private_key_file location related to user home directory
This commit is contained in:
parent
b11f96eaa4
commit
2222f6df58
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue