Fixed monit restarted error.

Errors everytime...
pull/4420/head
Shuhao Wu 2013-09-16 19:14:17 -04:00
parent c934d4a383
commit 0d2a3f1b0c
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ def main():
module.exit_json(changed=True) module.exit_json(changed=True)
module.run_command('%s stop %s' % (MONIT, name)) module.run_command('%s stop %s' % (MONIT, name))
rc, out, err = module.run_command('%s start %s' % (MONIT, name)) rc, out, err = module.run_command('%s start %s' % (MONIT, name))
if 'Initializing' in out: if 'Initializing' in out or 'start pending' in out:
module.exit_json(changed=True, name=name, state=state) module.exit_json(changed=True, name=name, state=state)
module.fail_json(msg=out) module.fail_json(msg=out)