mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Remove transport_test for some connection types (#28450)
So we are removing the transport_test for the listed connection types, because they fail to take into account bastion or proxy servers for testing the transport. The result of removing this, is that modules using this facility will do a complete round-trip attempt, running a module, which is a bit heavier but correct. This fixes #23774
This commit is contained in:
@@ -130,14 +130,6 @@ class Connection(ConnectionBase):
|
||||
|
||||
transport = 'paramiko'
|
||||
|
||||
def transport_test(self, connect_timeout):
|
||||
''' Test the transport mechanism, if available '''
|
||||
host = self._play_context.remote_addr
|
||||
port = int(self._play_context.port or 22)
|
||||
display.vvv("attempting transport test to %s:%s" % (host, port))
|
||||
sock = socket.create_connection((host, port), connect_timeout)
|
||||
sock.close()
|
||||
|
||||
def _cache_key(self):
|
||||
return "%s__%s__" % (self._play_context.remote_addr, self._play_context.remote_user)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user