Skip to content

Commit

Permalink
machinectl: include the success command (#5287) (#5312)
Browse files Browse the repository at this point in the history
Combines the success command when building the become command. This is
consistent with other become plugins.

(cherry picked from commit f3bcfa5)

Co-authored-by: Ben Brown <[email protected]>
  • Loading branch information
patchback[bot] and benjamb authored Sep 28, 2022
1 parent f9fecf1 commit 8beb5d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/5287-machinectl-become-success.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- machinectl become plugin - combine the success command when building the become command to be consistent with other become plugins (https://github.com/ansible-collections/community.general/pull/5287).
2 changes: 1 addition & 1 deletion plugins/become/machinectl.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def build_become_command(self, cmd, shell):

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

def check_success(self, b_output):
b_output = self.remove_ansi_codes(b_output)
Expand Down

0 comments on commit 8beb5d7

Please sign in to comment.