EX294 Manage task execution and roles Practice Question
A playbook includes multiple roles. The administrator wants to skip a specific role during execution. Which technique should they use?
⚠ Common exam trap
Candidates often confuse --tags and --skip-tags, mistakenly choosing --tags when the goal is to skip a role.
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
✓
Use tags on the role and run with --skip-tags
Ansible roles support tagging, and the `--skip-tags` option allows you to exclude all tasks within a role that share a specific tag. By assigning a unique tag to the role (e.g., `tags: skip_me`) and running the playbook with `--skip-tags skip_me`, the entire role is skipped without modifying individual tasks or hosts.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Add a condition to each task in the role
Why it's wrong here
Conditioning every task in the role duplicates logic across the role and still evaluates each task, rather than excluding the role from the run. It is tempting because when conditions are already used per task, extending them feels consistent — yet the correct approach skips the whole role at the play level, avoiding per-task edits.
- ✗
Use the '--limit' option to exclude hosts
Why it's wrong here
--limit restricts which hosts the play targets, not which roles execute; the role still runs on every included host. It is tempting because it is the usual way to narrow a playbook run, and it works when the goal is excluding specific managed nodes rather than skipping a role.
- ✗
Use tags on the role and run with --tags
Why it's wrong here
Tags select which tasks or roles run, but skipping a role requires excluding its tags, and untagged tasks in that role still execute unless every task is tagged. It is tempting because --tags is the standard selective-execution mechanism, and it works cleanly when the role's tasks all carry a dedicated tag.
- ✓
Use tags on the role and run with --skip-tags
Why this is correct
Tags applied to a role let you selectively control execution; running ansible-playbook with --skip-tags excludes any role carrying that tag. This satisfies the requirement to skip one specific role while the remaining roles in the playbook still run.
Go deeper
Related to this question
About these practice questions
This EX294 question is part of Courseiva's 392-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.