Courseiva

EX294 Manage task execution and roles Practice Question

Which TWO statements about Ansible roles are correct?

⚠ Common exam trap

Many candidates confuse Ansible Galaxy as a CI tool because it has 'Galaxy' in its name, or assume role dependencies require a separate file like dependencies.yml, when in fact they must be placed in meta/main.yml.

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

✓

Roles must follow a specific directory structure.

Option A is correct because Ansible roles rely on a defined directory layout (e.g., tasks/, handlers/, defaults/, vars/, files/, templates/, meta/, and the main.yml entry files) so that Ansible can automatically load each component without explicit includes. Option B is correct because Ansible Galaxy is the public repository and CLI for packaging, downloading, and sharing roles, so roles can indeed be distributed and installed via Galaxy (e.g., ansible-galaxy install). Option C is wrong because Ansible Galaxy is a role/content distribution hub, not a CI tool; CI for roles would be handled by tools like Jenkins, GitLab CI, or Molecule. Option D is wrong because role dependencies are declared in meta/main.yml under the dependencies key, not in a file named dependencies.yml. Option E is wrong because role names are plain directory names and do not use a .role extension.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Roles must follow a specific directory structure.

    Why this is correct

    Ansible roles enforce a defined directory hierarchy — tasks, handlers, defaults, vars, files, templates and meta — so the role loader can locate content automatically. This structure satisfies the stem's requirement that roles follow a specific layout, since deviating from these conventional paths prevents Ansible from resolving tasks and variables correctly.

  • ✓

    Roles can be shared via Ansible Galaxy.

    Why this is correct

    Ansible Galaxy serves as the public repository for distributing and installing reusable roles, satisfying the requirement for sharing content across teams or projects. Roles packaged with the correct directory structure can be published and retrieved using the ansible-galaxy command, enabling standardised reuse rather than manual copying between control nodes.

  • ✗

    Ansible Galaxy is a continuous integration tool for testing roles.

    Why it's wrong here

    Ansible Galaxy is a repository for sharing and downloading community roles, not a CI tool; it neither runs nor tests playbooks. It tempts because Galaxy hosts role content, so candidates conflate distribution with testing. Testing roles requires a separate runner such as Molecule or ansible-test.

  • ✗

    Role dependencies must be defined in a file named dependencies.yml.

    Why it's wrong here

    Dependencies belong in meta/main.yml under a dependencies key, not a separate dependencies.yml file. The option tempts because meta/ does hold role metadata, so a dedicated dependencies file feels plausible. Ansible reads only meta/main.yml for dependency resolution.

  • ✗

    Role names must have a .role extension.

    Why it's wrong here

    Role directories are named plainly, such as myrole, with no extension; Ansible resolves them by directory name under roles/. The option tempts because file extensions are common elsewhere, but roles are directories, not files. Adding .role breaks role lookup entirely.

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 →

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.