diff --git a/changelogs/fragments/11621-skip-no_such_process-for-name-all.yml b/changelogs/fragments/11621-skip-no_such_process-for-name-all.yml new file mode 100644 index 0000000000..643d946acf --- /dev/null +++ b/changelogs/fragments/11621-skip-no_such_process-for-name-all.yml @@ -0,0 +1,2 @@ +minor_changes: + - supervisorctl - added an additional condition for generating the error 'no such process' (https://github.com/ansible-collections/community.general/issues/11621, https://github.com/ansible-collections/community.general/pull/11632). \ No newline at end of file diff --git a/plugins/modules/supervisorctl.py b/plugins/modules/supervisorctl.py index 8e181aade6..2fe370949d 100644 --- a/plugins/modules/supervisorctl.py +++ b/plugins/modules/supervisorctl.py @@ -273,7 +273,7 @@ def main(): module.fail_json(msg=out, name=name, state=state) # from this point onwards, if there are no matching processes, module cannot go on. - if len(processes) == 0: + if len(processes) == 0 and name != "all": module.fail_json(name=name, msg="ERROR (no such process)") if state == "started":