Add support for connection type in ansible_hosts file

This commit is contained in:
Patrick Pelletier 2013-02-22 11:11:08 -05:00
commit 4c0e6722c4
2 changed files with 6 additions and 5 deletions

View file

@ -31,9 +31,8 @@ class Connection(object):
def __init__(self, runner):
self.runner = runner
def connect(self, host, port, user, password):
def connect(self, host, port, user, password, transport):
conn = None
transport = self.runner.transport
conn = utils.plugins.connection_loader.get(transport, self.runner, host, port, user=user, password=password)
if conn is None:
raise AnsibleError("unsupported connection type: %s" % transport)