mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Set delegate on connection prior to calling connect.
This commit is contained in:
@@ -931,9 +931,11 @@ 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, actual_private_key_file)
|
||||
if self.delegate_to or host != actual_host:
|
||||
conn.delegate = host
|
||||
delegate_host = host
|
||||
else:
|
||||
delegate_host = None
|
||||
conn = self.connector.connect(actual_host, actual_port, actual_user, actual_pass, actual_transport, actual_private_key_file, delegate_host)
|
||||
|
||||
default_shell = getattr(conn, 'default_shell', '')
|
||||
shell_type = inject.get('ansible_shell_type')
|
||||
|
||||
Reference in New Issue
Block a user