Skip to content

Commit

Permalink
Fix issues with enable become plugin (ansible#52657)
Browse files Browse the repository at this point in the history
* Work around become_user not being set
  • Loading branch information
Qalthos authored Feb 20, 2019
1 parent 67f1477 commit 1b97457
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ansible/plugins/action/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ def _is_become_unprivileged(self):
# we need to return become_unprivileged as True
admin_users = self._get_admin_users()
remote_user = self._get_remote_user()
return bool(self.get_become_option('become_user') not in admin_users + [remote_user])
become_user = self.get_become_option('become_user')
return bool(become_user and become_user not in admin_users + [remote_user])

def _make_tmp_path(self, remote_user=None):
'''
Expand Down

0 comments on commit 1b97457

Please sign in to comment.