mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
fixed issue with prompt == none and su + ask_pass in ssh plugin
This commit is contained in:
@@ -335,7 +335,7 @@ class Connection(object):
|
||||
"sudo", "Sorry, try again.")
|
||||
if sudo_errput.strip().endswith("%s%s" % (prompt, incorrect_password)):
|
||||
raise errors.AnsibleError('Incorrect sudo password')
|
||||
elif sudo_errput.endswith(prompt):
|
||||
elif prompt and sudo_errput.endswith(prompt):
|
||||
stdin.write(self.runner.sudo_pass + '\n')
|
||||
|
||||
if p.stdout in rfd:
|
||||
|
||||
Reference in New Issue
Block a user