mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 23:44:00 -07:00
Add support for connection type in ansible_hosts file
This commit is contained in:
parent
9d594d7494
commit
4c0e6722c4
2 changed files with 6 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue