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__()pull/4420/head
parent
09605706d9
commit
3697d6582f
|
@ -54,8 +54,6 @@ class ConnectionBase:
|
||||||
if not hasattr(self, '_connected'):
|
if not hasattr(self, '_connected'):
|
||||||
self._connected = False
|
self._connected = False
|
||||||
|
|
||||||
self._connect()
|
|
||||||
|
|
||||||
def _become_method_supported(self, become_method):
|
def _become_method_supported(self, become_method):
|
||||||
''' Checks if the current class supports this privilege escalation method '''
|
''' Checks if the current class supports this privilege escalation method '''
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ class Connection(ConnectionBase):
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
# SSH connection specific init stuff
|
# SSH connection specific init stuff
|
||||||
|
self._common_args = []
|
||||||
self.HASHED_KEY_MAGIC = "|1|"
|
self.HASHED_KEY_MAGIC = "|1|"
|
||||||
self._has_pipelining = True
|
self._has_pipelining = True
|
||||||
|
|
||||||
|
@ -65,7 +66,6 @@ class Connection(ConnectionBase):
|
||||||
if self._connected:
|
if self._connected:
|
||||||
return self
|
return self
|
||||||
|
|
||||||
self._common_args = []
|
|
||||||
extra_args = C.ANSIBLE_SSH_ARGS
|
extra_args = C.ANSIBLE_SSH_ARGS
|
||||||
if extra_args is not None:
|
if extra_args is not None:
|
||||||
# make sure there is no empty string added as this can produce weird errors
|
# make sure there is no empty string added as this can produce weird errors
|
||||||
|
|
Loading…
Reference in New Issue