mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix monit module. Use lowercase letters check instead of uppercase
This commit is contained in:
parent
ac0a7d965a
commit
c2e2d53a16
1 changed files with 5 additions and 5 deletions
|
@ -100,7 +100,7 @@ def main():
|
|||
module.exit_json(changed=True)
|
||||
module.run_command('%s stop %s' % (MONIT, name))
|
||||
rc, out, err = module.run_command('%s summary | grep %s' % (MONIT, name))
|
||||
if 'Not monitored' in out or 'stop pending' in out:
|
||||
if 'not monitored' in out or 'stop pending' in out:
|
||||
module.exit_json(changed=True, name=name, state=state)
|
||||
module.fail_json(msg=out)
|
||||
|
||||
|
@ -109,7 +109,7 @@ def main():
|
|||
module.exit_json(changed=True)
|
||||
module.run_command('%s unmonitor %s' % (MONIT, name))
|
||||
rc, out, err = module.run_command('%s summary | grep %s' % (MONIT, name))
|
||||
if 'Not monitored' in out:
|
||||
if 'not monitored' in out:
|
||||
module.exit_json(changed=True, name=name, state=state)
|
||||
module.fail_json(msg=out)
|
||||
|
||||
|
@ -118,7 +118,7 @@ def main():
|
|||
module.exit_json(changed=True)
|
||||
module.run_command('%s stop %s' % (MONIT, name))
|
||||
rc, out, err = module.run_command('%s start %s' % (MONIT, name))
|
||||
if 'Initializing' in out or 'start pending' in out:
|
||||
if 'initializing' in out or 'start pending' in out:
|
||||
module.exit_json(changed=True, name=name, state=state)
|
||||
module.fail_json(msg=out)
|
||||
|
||||
|
@ -127,7 +127,7 @@ def main():
|
|||
module.exit_json(changed=True)
|
||||
module.run_command('%s start %s' % (MONIT, name))
|
||||
rc, out, err = module.run_command('%s summary | grep %s' % (MONIT, name))
|
||||
if 'Initializing' in out or 'start pending' in out:
|
||||
if 'initializing' in out or 'start pending' in out:
|
||||
module.exit_json(changed=True, name=name, state=state)
|
||||
module.fail_json(msg=out)
|
||||
|
||||
|
@ -136,7 +136,7 @@ def main():
|
|||
module.exit_json(changed=True)
|
||||
module.run_command('%s monitor %s' % (MONIT, name))
|
||||
rc, out, err = module.run_command('%s summary | grep %s' % (MONIT, name))
|
||||
if 'Initializing' in out or 'start pending' in out:
|
||||
if 'initializing' in out or 'start pending' in out:
|
||||
module.exit_json(changed=True, name=name, state=state)
|
||||
module.fail_json(msg=out)
|
||||
|
||||
|
|
Loading…
Reference in a new issue