Courseiva
Implement advanced Ansible automationeasyMultiple ChoiceObjective-mapped

EX294 Implement advanced Ansible automation Practice Question

An administrator wants to reuse a set of tasks that configure a firewall across multiple playbooks. Which Ansible feature should be used to achieve this?

⚠ Common exam trap

It's easy for candidates to confuse roles with other reusable components like variables or handlers, leading candidates to think that storing tasks in a vars file or using handlers can achieve the same cross-playbook reuse.

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

Create a role for firewall configuration.

A role is the correct Ansible feature for reusing a set of tasks across multiple playbooks. Roles provide a structured, self-contained directory layout for tasks, handlers, variables, templates, and files, allowing the firewall configuration logic to be packaged once and referenced in any playbook via the `roles:` directive or `import_role`/`include_role` modules.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Create a role for firewall configuration.

    Why this is correct

    Roles are the standard way to package reusable content.

  • Add the tasks to the inventory file under a group.

    Why it's wrong here

    Inventory files define hosts and variables, not tasks.

  • Define the tasks in a vars file and include it.

    Why it's wrong here

    Vars files cannot contain tasks.

  • Define the tasks as handlers and notify them.

    Why it's wrong here

    Handlers are only triggered by notifications, not called directly.

About these practice questions

This EX294 question is part of Courseiva's 520-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 →

How Courseiva writes practice questions · Editorial policy

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.