mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 07:24:00 -07:00
Makes ports configurable for fireball. Note port defaults really belong in the connection plugins, not runner, which can be refactored later.
This commit is contained in:
parent
612561ad0e
commit
04954dbc1e
3 changed files with 23 additions and 10 deletions
|
@ -35,12 +35,14 @@ class Connection(object):
|
|||
def __init__(self, runner):
|
||||
self.runner = runner
|
||||
|
||||
def connect(self, host, port=None):
|
||||
def connect(self, host, port):
|
||||
conn = None
|
||||
transport = self.runner.transport
|
||||
module = modules.get(transport, None)
|
||||
if module is None:
|
||||
raise AnsibleError("unsupported connection type: %s" % transport)
|
||||
conn = module.Connection(self.runner, host, port)
|
||||
return conn.connect()
|
||||
self.active = conn.connect()
|
||||
return self.active
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue