EVE-NG Linux VM SSH troubleshooting
September 20, 2025
Handling errors in Ansible playbooks
When developing playbooks, it’s often necessary to modify Ansible’s default behavior in case of errors.
Here are three common scenarios:
- When a task should only run in a specific mode
- When a task should never report changes
- When a task should fail under certain conditions
Additionally, we’ll explore three scenarios that are useful to know but rarely encountered in practice.
Running Tasks in a specific mode
You can enforce a task to run only in a specific mode. For instance, the following task runs only in check mode (-C):
However, this doesn’t change the task’s behavior, only when it is executed. In check mode, commands that can alter the system are not executed. Each module handles check mode differently.
Continue reading the post on Patreon .