DEV Community

Roy
Roy

Posted on

Answer: Using Ansible to stop service that might not exist

The following will register the module output in service_stop; if the module execution's standard output does not contain "Could not find the requested service" AND the service fails to stop based on return code, the module execution will fail. Since you did not include the entire stack trace I…

Top comments (0)