mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Make tests happy
This commit is contained in:
parent
2222f6df58
commit
30678e04ac
2 changed files with 11 additions and 2 deletions
|
@ -584,9 +584,12 @@ class Runner(object):
|
|||
actual_user = inject.get('ansible_ssh_user', self.remote_user)
|
||||
actual_pass = inject.get('ansible_ssh_pass', self.remote_pass)
|
||||
actual_transport = inject.get('ansible_connection', self.transport)
|
||||
actual_private_key_file = os.path.expanduser(inject.get('ansible_ssh_private_key_file', self.private_key_file))
|
||||
actual_private_key_file = inject.get('ansible_ssh_private_key_file', self.private_key_file)
|
||||
self.sudo_pass = inject.get('ansible_sudo_pass', self.sudo_pass)
|
||||
|
||||
if actual_private_key_file is not None:
|
||||
actual_private_key_file = os.path.expanduser(actual_private_key_file)
|
||||
|
||||
if self.accelerate and actual_transport != 'local':
|
||||
#Fix to get the inventory name of the host to accelerate plugin
|
||||
if inject.get('ansible_ssh_host', None):
|
||||
|
@ -626,6 +629,10 @@ class Runner(object):
|
|||
actual_private_key_file = os.path.expanduser(delegate_info.get('ansible_ssh_private_key_file', self.private_key_file))
|
||||
actual_transport = delegate_info.get('ansible_connection', self.transport)
|
||||
self.sudo_pass = delegate_info.get('ansible_sudo_pass', self.sudo_pass)
|
||||
|
||||
if actual_private_key_file is not None:
|
||||
actual_private_key_file = os.path.expanduser(actual_private_key_file)
|
||||
|
||||
for i in delegate_info:
|
||||
if i.startswith("ansible_") and i.endswith("_interpreter"):
|
||||
inject[i] = delegate_info[i]
|
||||
|
|
|
@ -79,9 +79,11 @@ class ActionModule(object):
|
|||
if not dest_host is src_host:
|
||||
user = inject.get('ansible_ssh_user',
|
||||
self.runner.remote_user)
|
||||
private_key = os.path.expanduser(inject.get('ansible_ssh_private_key_file', self.runner.private_key_file))
|
||||
private_key = inject.get('ansible_ssh_private_key_file', self.runner.private_key_file)
|
||||
if not private_key is None:
|
||||
private_key = os.path.expanduser(private_key)
|
||||
options['private_key'] = private_key
|
||||
|
||||
src = self._process_origin(src_host, src, user)
|
||||
dest = self._process_origin(dest_host, dest, user)
|
||||
|
||||
|
|
Loading…
Reference in a new issue