mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 06:31:23 -07:00
Fix ssh state issues by simply assuming it's never connected
This commit is contained in:
parent
65747285a4
commit
70de8bc96f
1 changed files with 2 additions and 3 deletions
|
@ -60,7 +60,6 @@ class Connection(ConnectionBase):
|
|||
# management here.
|
||||
|
||||
def _connect(self):
|
||||
self._connected = True
|
||||
return self
|
||||
|
||||
@staticmethod
|
||||
|
@ -372,7 +371,7 @@ class Connection(ConnectionBase):
|
|||
# wait for a password prompt.
|
||||
state = states.index('awaiting_prompt')
|
||||
display.debug('Initial state: %s: %s' % (states[state], self._play_context.prompt))
|
||||
elif self._play_context.become and self._play_context.success_key and not self._connected:
|
||||
elif self._play_context.become and self._play_context.success_key:
|
||||
# We're requesting escalation without a password, so we have to
|
||||
# detect success/failure before sending any initial data.
|
||||
state = states.index('awaiting_escalation')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue