Quiz Entry - updated: 2026.11.12
What does ignore_errors: true do, and what doesn't it cover?
It lets the play continue on that host even though the task failed; it only covers tasks that ran and returned failed, not undefined variables, unreachable hosts or syntax errors.
- name: Latest version of notapkg is installed
ansible.builtin.dnf:
name: notapkg
state: latest
ignore_errors: true
The package notapkg does not exist, so dnf fails. With ignore_errors: true the failure is printed (shown as ...ignoring), counted under ignored= in the recap, and the next task runs as if nothing happened.
Limits worth knowing:
- It does not ignore undefined-variable errors, connection failures, execution problems or YAML syntax errors. Those happen before the task can return a result.
- It hides every failure of that task, including ones you didn't anticipate. Where you can, prefer
failed_whenwith a precise condition, or ablockwithrescue, so only the expected failure is tolerated.
Go deeper:
Ignoring failed commands (official docs) โ what
ignore_errorsdoes and does not cover.