Courseiva

EX294 Practice Question: Create content collections and execution environments

An administrator needs to create a new Ansible content collection named `myorg.automation` that will contain roles and modules. Which command initializes the collection directory structure with the required skeleton files?

⚠ Common exam trap

Many exam-takers confuse `ansible-galaxy init` for roles with `ansible-galaxy collection init` for collections, as both use the `ansible-galaxy` command but target different content types.

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

✓

ansible-galaxy collection init myorg.automation

The `ansible-galaxy collection init` command is the correct way to create a new collection skeleton. It sets up the directory structure with the namespace and collection name, and generates essential files like `galaxy.yml` and `README.md`. Other commands either initialize roles (`ansible-galaxy init`) or serve entirely different purposes.

Answer analysis

Option-by-option breakdown

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

  • ✓

    ansible-galaxy collection init myorg.automation

    Why this is correct

    The `ansible-galaxy collection init` command creates a new collection directory structure with the specified namespace and name. It generates skeleton files including `galaxy.yml`, `README.md`, `docs/`, `plugins/`, `roles/`, and `playbooks/`. This command is the standard way to start a new collection, ensuring all necessary files are present for development and packaging.

  • ✗

    ansible-playbook --init-collection myorg.automation

    Why it's wrong here

    `ansible-playbook` is used to run playbooks and does not have an `--init-collection` option. This command does not exist and would not create a collection. Creating a collection requires the `ansible-galaxy collection init` command, which is specifically designed for that purpose.

  • ✗

    ansible-galaxy init myorg.automation

    Why it's wrong here

    `ansible-galaxy init` is used to initialize a new role, not a collection. It creates a role directory structure with tasks, handlers, defaults, etc. While it is a valid command for roles, it does not create the collection skeleton with `galaxy.yml` and the proper namespace/name directory hierarchy required for a collection.

  • ✗

    ansible-builder init myorg.automation

    Why it's wrong here

    `ansible-builder` does not have an `init` subcommand for creating collections. `ansible-builder` is used to build execution environments, not to initialize collection structures. Using it here would not produce the desired collection skeleton and would likely result in an error or unrelated output.

About these practice questions

One of 392 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 →

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.