diff options
author | Florian Apolloner <florian@apolloner.eu> | 2015-09-17 12:23:58 +0200 |
---|---|---|
committer | Florian Apolloner <florian@apolloner.eu> | 2015-09-17 12:24:16 +0200 |
commit | decd9e8710d9f322c454f595539fc7b61ad8ab84 (patch) | |
tree | f89ca011117ac6850da25781f0923b410c70871a | |
parent | 3db8070aa36db3ecd927b1f2cfe8ff680f7a105d (diff) | |
download | ansible-decd9e8710d9f322c454f595539fc7b61ad8ab84.tar.gz |
Only use become if the target user difers from the current remote user.
-rw-r--r-- | lib/ansible/plugins/action/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py index e1dbad1701..b161c8f9d2 100644 --- a/lib/ansible/plugins/action/__init__.py +++ b/lib/ansible/plugins/action/__init__.py @@ -453,7 +453,7 @@ class ActionBase: self._display.debug("no command, exiting _low_level_execute_command()") 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") cmd = self._play_context.make_become_cmd(cmd, executable=executable) |