Skip to content

Commit

Permalink
Correct machinectl become plugin function arguments (ansible#58734)
Browse files Browse the repository at this point in the history
* Correct get_option function name and change flags to become_flags

* Remove the '--' from the returned command

* add changelog fragment

* change changelog fragment description

* move the -q argument to machinectl before the shell argument to resolve issues with machinectl v230 (see ansible#56571)
  • Loading branch information
jb3 authored and bcoca committed Jul 5, 2019
1 parent 6164773 commit 4f642da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
@@ -0,0 +1,2 @@
bugfixes:
- machinectl become plugin - correct bugs which induced errors on plugin usage
6 changes: 3 additions & 3 deletions lib/ansible/plugins/become/machinectl.py
Expand Up @@ -81,7 +81,7 @@ def build_become_command(self, cmd, shell):
if not cmd:
return cmd

become = self._get_option('become_exe') or self.name
flags = self.get_option('flags') or ''
become = self.get_option('become_exe') or self.name
flags = self.get_option('become_flags') or ''
user = self.get_option('become_user') or ''
return '%s shell -q %s %s@ -- %s' % (become, flags, user, cmd)
return '%s -q shell %s %s@ %s' % (become, flags, user, cmd)

0 comments on commit 4f642da

Please sign in to comment.