mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-29 11:40:22 -07:00
become plugins: use f-strings (#9319)
* become plugins: use f-strings * add changelog frag
This commit is contained in:
parent
d05d067f3b
commit
c7edf0a87b
10 changed files with 28 additions and 18 deletions
|
@ -123,7 +123,7 @@ class BecomeModule(BecomeBase):
|
|||
|
||||
flags = self.get_option('become_flags')
|
||||
user = self.get_option('become_user')
|
||||
return '%s -q shell %s %s@ %s' % (become, flags, user, self._build_success_command(cmd, shell))
|
||||
return f'{become} -q shell {flags} {user}@ {self._build_success_command(cmd, shell)}'
|
||||
|
||||
def check_success(self, b_output):
|
||||
b_output = self.remove_ansi_codes(b_output)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue