|
|
|
@ -435,6 +435,7 @@ 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 = inject.get('ansible_ssh_private_key_file', self.private_key_file)
|
|
|
|
|
if actual_transport in [ 'paramiko', 'ssh' ]:
|
|
|
|
|
actual_port = inject.get('ansible_ssh_port', port)
|
|
|
|
|
|
|
|
|
@ -457,6 +458,7 @@ class Runner(object):
|
|
|
|
|
actual_port = delegate_info.get('ansible_ssh_port', port)
|
|
|
|
|
actual_user = delegate_info.get('ansible_ssh_user', actual_user)
|
|
|
|
|
actual_pass = delegate_info.get('ansible_ssh_pass', actual_pass)
|
|
|
|
|
actual_private_key_file = delegate_info.get('private_key_file', self.private_key_file)
|
|
|
|
|
actual_transport = delegate_info.get('ansible_connection', self.transport)
|
|
|
|
|
for i in delegate_info:
|
|
|
|
|
if i.startswith("ansible_") and i.endswith("_interpreter"):
|
|
|
|
@ -476,7 +478,7 @@ class Runner(object):
|
|
|
|
|
return ReturnData(host=host, comm_ok=False, result=result)
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
conn = self.connector.connect(actual_host, actual_port, actual_user, actual_pass, actual_transport)
|
|
|
|
|
conn = self.connector.connect(actual_host, actual_port, actual_user, actual_pass, actual_transport, actual_private_key_file)
|
|
|
|
|
if delegate_to or host != actual_host:
|
|
|
|
|
conn.delegate = host
|
|
|
|
|
|
|
|
|
|