mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-29 08:01:24 -07:00
fixed detection of incorrect password
This commit is contained in:
parent
c745796707
commit
3fab516d3d
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ class ConnectionBase(with_metaclass(ABCMeta, object)):
|
||||||
|
|
||||||
def check_incorrect_password(self, output):
|
def check_incorrect_password(self, output):
|
||||||
incorrect_password = gettext.dgettext(self._connection_info.become_method, C.BECOME_ERROR_STRINGS[self._connection_info.become_method])
|
incorrect_password = gettext.dgettext(self._connection_info.become_method, C.BECOME_ERROR_STRINGS[self._connection_info.become_method])
|
||||||
if output.strip().endswith(incorrect_password):
|
if incorrect_password in output:
|
||||||
raise AnsibleError('Incorrect %s password' % self._connection_info.become_method)
|
raise AnsibleError('Incorrect %s password' % self._connection_info.become_method)
|
||||||
|
|
||||||
def handle_become_password(self, p, stdin):
|
def handle_become_password(self, p, stdin):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue