mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Fix become plugins (#50)
* Fix become plugins. * Fix become unit tests to avoid play_context.make_become_cmd. * Remove hack. * Remove explicit defaults. Adjust tests to be more like Ansible itself. * Forgot two lines. * Rewrite tests (again). * Rename play_context -> task, add possibility to pass var_options. * Add var_options variants. * Properly test overwriting.
This commit is contained in:
@@ -97,7 +97,8 @@ class BecomeModule(BecomeBase):
|
||||
if not cmd:
|
||||
return cmd
|
||||
|
||||
exe = self.get_option('become_exe') or self.name
|
||||
exe = self.get_option('become_exe')
|
||||
|
||||
flags = self.get_option('become_flags')
|
||||
noexe = not self.get_option('wrap_exe')
|
||||
return '%s %s "%s"' % (exe, flags, self._build_success_command(cmd, shell, noexe=noexe))
|
||||
|
||||
Reference in New Issue
Block a user