Commit d27f6e03 by Michael DeHaan

Merge pull request #4135 from shuhaowu/patch-1

Fixed monit restarted error.
parents c934d4a3 0d2a3f1b
......@@ -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:
if 'Initializing' in out or 'start pending' in out:
module.exit_json(changed=True, name=name, state=state)
module.fail_json(msg=out)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment