fix a problem with status detection after unmonitor command
This commit is contained in:
parent
2bcb0d4c08
commit
16db10958b
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ def main():
|
||||||
if module.check_mode:
|
if module.check_mode:
|
||||||
module.exit_json(changed=True)
|
module.exit_json(changed=True)
|
||||||
status = run_command('unmonitor')
|
status = run_command('unmonitor')
|
||||||
if status in ['not monitored']:
|
if status in ['not monitored'] or 'unmonitor pending' in status:
|
||||||
module.exit_json(changed=True, name=name, state=state)
|
module.exit_json(changed=True, name=name, state=state)
|
||||||
module.fail_json(msg='%s process not unmonitored' % name, status=status)
|
module.fail_json(msg='%s process not unmonitored' % name, status=status)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue