Courseiva

EX294 Practice Question: Create content collections and execution environments

You are creating a new Ansible content collection named 'acme.corp' using the ansible-galaxy collection init command. After running the command, you need to add a module that will be part of this collection. Where should you place the module file within the collection directory structure?

⚠ Common exam trap

Many exam-takers confuse the collection plugin directory structure with the legacy library directory used for standalone playbook modules.

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

✓

In the plugins/modules directory.

Ansible collections have a defined structure where plugins, including modules, are stored under the plugins directory. Modules specifically go in plugins/modules. This structure allows Ansible to automatically discover and load the module when the collection is installed, making it available for use in playbooks via the collection's fully qualified name.

Answer analysis

Option-by-option breakdown

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

  • ✗

    In the roles directory under a role named after the module.

    Why it's wrong here

    The roles directory is for storing Ansible roles that are part of the collection. Modules are not placed inside roles unless they are role-specific and intended to be used only within that role. For a collection-wide module, the correct location is plugins/modules. Placing it in a role would limit its accessibility and violate collection structure conventions.

  • ✗

    In the library directory at the root of the collection.

    Why it's wrong here

    The library directory is used for standalone roles or playbook-adjacent modules, not for collections. In a collection, modules must reside in plugins/modules to be recognized. Placing a module in library would not make it part of the collection and it would not be discoverable via the collection's namespace.

  • ✓

    In the plugins/modules directory.

    Why this is correct

    Ansible collections follow a standard directory layout. Modules are stored in the plugins/modules directory. When the collection is installed, Ansible automatically discovers modules in this location. Placing the module file there ensures it is properly loaded and available for use in playbooks with the fully qualified collection name (FQCN).

  • ✗

    In the modules directory at the root of the collection.

    Why it's wrong here

    There is no modules directory at the root of a collection. The correct path is plugins/modules. Ansible's collection loader expects plugins to be under the plugins directory, with subdirectories for each plugin type. Creating a modules directory at the root would not be recognized and the module would be ignored.

About these practice questions

Courseiva writes every EX294 question from scratch — 392 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Red Hat exam blueprint

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.