Set delegate on connection prior to calling connect.

This commit is contained in:
Chris Church 2014-11-23 21:49:33 -05:00
parent 116109468c
commit de2746ae86
2 changed files with 6 additions and 3 deletions

View file

@ -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