1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Change to transport is local *and* is localhost

Connection.connect() now requires that, in order to use LocalConnection,
you specify transport is local and that the hostname is localhost.
This commit is contained in:
Stephen Fromm 2012-04-10 13:20:03 -07:00
parent 6749903e57
commit 9213cf896e

View file

@ -41,7 +41,7 @@ class Connection(object):
def connect(self, host): def connect(self, host):
conn = None conn = None
if self.transport == 'local' or self._LOCALHOSTRE.search(host): if self.transport == 'local' and self._LOCALHOSTRE.search(host):
conn = LocalConnection(self.runner, host) conn = LocalConnection(self.runner, host)
elif self.transport == 'paramiko': elif self.transport == 'paramiko':
conn = ParamikoConnection(self.runner, host) conn = ParamikoConnection(self.runner, host)