Only use become if the target user difers from the current remote user.
This commit is contained in:
parent
3db8070aa3
commit
decd9e8710
1 changed files with 1 additions and 1 deletions
|
@ -453,7 +453,7 @@ class ActionBase:
|
||||||
self._display.debug("no command, exiting _low_level_execute_command()")
|
self._display.debug("no command, exiting _low_level_execute_command()")
|
||||||
return dict(stdout='', stderr='')
|
return dict(stdout='', stderr='')
|
||||||
|
|
||||||
if sudoable and self._play_context.become:
|
if sudoable and self._play_context.become and self._play_context.become_user != self._play_context.remote_user:
|
||||||
self._display.debug("using become for this command")
|
self._display.debug("using become for this command")
|
||||||
cmd = self._play_context.make_become_cmd(cmd, executable=executable)
|
cmd = self._play_context.make_become_cmd(cmd, executable=executable)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue