mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 20:31:27 -07:00
Set delegate on connection prior to calling connect.
This commit is contained in:
parent
116109468c
commit
de2746ae86
2 changed files with 6 additions and 3 deletions
|
@ -31,10 +31,11 @@ class Connector(object):
|
|||
def __init__(self, runner):
|
||||
self.runner = runner
|
||||
|
||||
def connect(self, host, port, user, password, transport, private_key_file):
|
||||
def connect(self, host, port, user, password, transport, private_key_file, delegate_host):
|
||||
conn = utils.plugins.connection_loader.get(transport, self.runner, host, port, user=user, password=password, private_key_file=private_key_file)
|
||||
if conn is None:
|
||||
raise AnsibleError("unsupported connection type: %s" % transport)
|
||||
conn.delegate = delegate_host
|
||||
if private_key_file:
|
||||
# If private key is readable by user other than owner, flag an error
|
||||
st = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue