EX294 Manage task execution and roles Practice Question
Which best practice should be followed when using Ansible to manage task execution across multiple hosts?
⚠ Common exam trap
Many candidates confuse 'ignore_errors' with a valid error-handling strategy, or assume serial execution is always safer, when in fact idempotency is the fundamental best practice that Ansible's design revolves around.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Ensure tasks are idempotent so they can be run multiple times without changing the system state beyond the desired state.
Idempotency is a core principle of Ansible: running the same playbook multiple times should produce the same desired state without unintended side effects. This ensures predictable, safe task execution across multiple hosts, as Ansible modules are designed to check the current state before making changes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use 'ignore_errors: yes' on all tasks to prevent playbook failures.
Why it's wrong here
Ignoring errors on every task masks genuine failures and lets playbooks continue with hosts in an inconsistent state. ignore_errors suits only tasks whose failure is genuinely tolerable, such as checking for an optional file, not blanket error suppression across a whole play.
- ✓
Ensure tasks are idempotent so they can be run multiple times without changing the system state beyond the desired state.
Why this is correct
Idempotence means repeated runs converge on the same desired state without side effects, which is essential when a play targets many hosts and some tasks may be retried or partially applied. It keeps multi-host execution predictable and safe.
- ✗
Always use serial execution to avoid race conditions.
Why it's wrong here
Serial execution reduces parallelism and is unnecessary when tasks are idempotent and hosts are independent. serial is correct specifically for rolling updates or clustered services where batches must be updated gradually to preserve availability, not as a default for all plays.
- ✗
Write tasks that rely on the previous task's output to ensure correct order.
Why it's wrong here
Ansible tasks already execute in written order per host, so relying on a previous task's output adds no ordering guarantee and breaks when hosts differ. Registering output is correct when a later task genuinely needs a value from an earlier one on the same host.
Go deeper
Related to this question
About these practice questions
One of 392 original EX294 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This EX294 practice question is part of Courseiva's free Red Hat certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the EX294 exam.