Courseiva

EX294 Practice Question: Create content collections and execution environments

A developer wants to create a new collection named 'myutils' under namespace 'myorg'. Which command initializes the collection structure?

⚠ Common exam trap

Watch out — candidates often confuse role scaffolding commands (`ansible-galaxy init` or `ansible-galaxy role init`) with collection initialization, and mistakenly apply verbs like `scaffold`, `create`, or `new` which are not valid for collections.

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.myutils

The correct command to initialize a new Ansible collection structure is `ansible-galaxy collection init <namespace.collection>`. This creates the required directory layout, including `galaxy.yml`, `README.md`, and subdirectories like `roles/`, `playbooks/`, and `plugins/`. Option D matches this syntax exactly.

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 scaffold myorg.myutils

    Why it's wrong here

    The scaffold subcommand does not exist; ansible-galaxy provides init for creating a collection skeleton, so this command fails outright. It is tempting because scaffolding is a familiar concept from other frameworks, and init would be correct when starting a brand-new collection locally before publishing to a namespace.

  • ✗

    ansible-galaxy collection create myorg.myutils

    Why it's wrong here

    'create' is not a valid ansible-galaxy collection subcommand, so the command errors rather than scaffolding the directory structure. It is tempting because 'create' reads naturally for initialising something, and similar verbs appear in other tooling, but the collection workflow uses 'init'.

  • ✗

    ansible-galaxy collection new myorg.myutils

    Why it's wrong here

    'new' is not an ansible-galaxy collection subcommand; the CLI rejects it, leaving no galaxy.yml, README or directory skeleton. It is tempting because 'new' is the intuitive verb for starting a project, and it is used by other scaffolding tools, but Ansible's collection command is 'init'.

  • ✓

    ansible-galaxy collection init myorg.myutils

    Why this is correct

    `ansible-galaxy collection init myorg.myutils` scaffolds the namespace/collection directory tree, generating `galaxy.yml`, `README.md`, `plugins/`, `roles/` and `docs/` under `myorg/myutils/`. The `init` subcommand is the only one that creates this skeleton, satisfying the stem's requirement to initialise the collection structure rather than build or install it.

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.