mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -07:00
ssh: Properly check for wrong su password
This commit is contained in:
parent
225eca6311
commit
b07113f358
1 changed files with 1 additions and 1 deletions
|
@ -161,7 +161,7 @@ class Connection(object):
|
||||||
if stdout.endswith("%s\r\n%s" % (incorrect_password, prompt)):
|
if stdout.endswith("%s\r\n%s" % (incorrect_password, prompt)):
|
||||||
raise errors.AnsibleError('Incorrect sudo password')
|
raise errors.AnsibleError('Incorrect sudo password')
|
||||||
|
|
||||||
if self.runner.su and su and self.runner.sudo_pass:
|
if self.runner.su and su and self.runner.su_pass:
|
||||||
incorrect_password = gettext.dgettext(
|
incorrect_password = gettext.dgettext(
|
||||||
"su", "Sorry")
|
"su", "Sorry")
|
||||||
if stdout.endswith("%s\r\n%s" % (incorrect_password, prompt)):
|
if stdout.endswith("%s\r\n%s" % (incorrect_password, prompt)):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue