Ansible shell module returns error when grep results are empty
grep by design returns code 1 if the given string was not found. Ansible by design stops execution if the return code is different from 0. Your system is working properly. To prevent Ansible from stopping playbook execution on this error, you can: add ignore_errors: yes parameter to the task use failed_when: parameter with a … Read more