mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-13 20:31:24 +00:00
Connection plugins no longer auto-connect (v2)
Also fixed a bug in ssh.py where an attribute was being inappropriately initialized in the _connect() method instead of __init__()
This commit is contained in:
@@ -54,8 +54,6 @@ class ConnectionBase:
|
||||
if not hasattr(self, '_connected'):
|
||||
self._connected = False
|
||||
|
||||
self._connect()
|
||||
|
||||
def _become_method_supported(self, become_method):
|
||||
''' Checks if the current class supports this privilege escalation method '''
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ class Connection(ConnectionBase):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
# SSH connection specific init stuff
|
||||
self._common_args = []
|
||||
self.HASHED_KEY_MAGIC = "|1|"
|
||||
self._has_pipelining = True
|
||||
|
||||
@@ -65,7 +66,6 @@ class Connection(ConnectionBase):
|
||||
if self._connected:
|
||||
return self
|
||||
|
||||
self._common_args = []
|
||||
extra_args = C.ANSIBLE_SSH_ARGS
|
||||
if extra_args is not None:
|
||||
# make sure there is no empty string added as this can produce weird errors
|
||||
|
||||
Reference in New Issue
Block a user