|
|
@ -194,9 +194,14 @@ def main():
|
|
|
|
if state == 'restarted':
|
|
|
|
if state == 'restarted':
|
|
|
|
rc, out, err = run_supervisorctl('update', check_rc=True)
|
|
|
|
rc, out, err = run_supervisorctl('update', check_rc=True)
|
|
|
|
processes = get_matched_processes()
|
|
|
|
processes = get_matched_processes()
|
|
|
|
|
|
|
|
if not processes:
|
|
|
|
|
|
|
|
module.fail_json(name=name, msg="ERROR (no such process)")
|
|
|
|
|
|
|
|
|
|
|
|
take_action_on_processes(processes, lambda s: True, 'restart', 'started')
|
|
|
|
take_action_on_processes(processes, lambda s: True, 'restart', 'started')
|
|
|
|
|
|
|
|
|
|
|
|
processes = get_matched_processes()
|
|
|
|
processes = get_matched_processes()
|
|
|
|
|
|
|
|
if not processes:
|
|
|
|
|
|
|
|
module.fail_json(name=name, msg="ERROR (no such process)")
|
|
|
|
|
|
|
|
|
|
|
|
if state == 'present':
|
|
|
|
if state == 'present':
|
|
|
|
if len(processes) > 0:
|
|
|
|
if len(processes) > 0:
|
|
|
|