mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-07-08 11:39:02 +00:00
Various cleanup to run_command
* Rename fail_on_rc_non_zero to check_rc, much more succinct. * Simplify method defintion * Fix command module and drop shell=shell option; whether to use shell is determined by if args is a list.
This commit is contained in:
parent
4f110e4fc6
commit
4eaee3df0a
7 changed files with 18 additions and 24 deletions
|
|
@ -63,7 +63,7 @@ def main():
|
|||
|
||||
if state == 'present':
|
||||
if not present:
|
||||
module.run_command('%s reread' % SUPERVISORCTL, fail_on_rc_non_zero=True)
|
||||
module.run_command('%s reread' % SUPERVISORCTL, check_rc=True)
|
||||
rc, out, err = module.run_command('%s add %s' % (SUPERVISORCTL, name))
|
||||
|
||||
if '%s: added process group' % name in out:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue