mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Make sure the command is sudoable before checking for the become password
Fixes #11714
This commit is contained in:
parent
e49575ff56
commit
0fcd53e887
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ class Connection(ConnectionBase):
|
|||
)
|
||||
self._display.debug("done running command with Popen()")
|
||||
|
||||
if self._play_context.prompt and self._play_context.become_pass:
|
||||
if self._play_context.prompt and self._play_context.become_pass and sudoable:
|
||||
fcntl.fcntl(p.stdout, fcntl.F_SETFL, fcntl.fcntl(p.stdout, fcntl.F_GETFL) | os.O_NONBLOCK)
|
||||
fcntl.fcntl(p.stderr, fcntl.F_SETFL, fcntl.fcntl(p.stderr, fcntl.F_GETFL) | os.O_NONBLOCK)
|
||||
become_output = ''
|
||||
|
|
Loading…
Reference in a new issue