EX294 Manage task execution and roles Practice Question
Which TWO statements about Ansible roles are true?
⚠ Common exam trap
Red Hat often tests the misconception that roles can only be invoked via 'include_role' or that role variables cannot be overridden, but in reality, roles support both static and dynamic inclusion, and vars/main.yml variables are overridable by higher-precedence variables like playbook vars.
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
✓
A role can include tasks, handlers, variables, templates, and files.
Ansible roles are designed to organize automation content into a standardized directory structure that can include tasks, handlers, variables, templates, and files. This modular structure allows for better code reuse and maintainability, as each component is stored in its own subdirectory within the role.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
A role can include tasks, handlers, variables, templates, and files.
Why this is correct
Roles organize these components in a standard structure.
- ✗
Roles are defined directly inside a playbook using the 'roles' keyword.
Why it's wrong here
Roles are external directories, not defined inline.
- ✓
Roles can be reused across multiple playbooks.
Why this is correct
Roles are designed for reusability.
- ✗
Roles can only be invoked using the 'include_role' module.
Why it's wrong here
Roles can also be listed under the 'roles' key in a play.
- ✗
Variables defined in a role's vars/main.yml cannot be overridden by playbook variables.
Why it's wrong here
They can be overridden because they have higher precedence than defaults but lower than playbook vars.
Go deeper
Related to this question
About these practice questions
One of 520 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.