Courseiva

EX294 Practice Question: Create content collections and execution environments

A developer wants to create a new Ansible collection from a skeleton template. Which command should be used?

⚠ Common exam trap

Many candidates confuse the `ansible-galaxy` subcommands for roles (`init` for roles) with those for collections, or they misremember the verb as `create` or `generate`, which are not valid for collection initialization.

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 my_namespace.my_collection`

The correct command is `ansible-galaxy collection init my_namespace.my_collection`, which creates a new collection skeleton with the required directory structure and metadata files. This is the official Ansible command for bootstrapping a collection from a template.

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 generate my_namespace.my_collection`

    Why it's wrong here

    `generate` is not a valid `ansible-galaxy collection` subcommand, so it errors instead of scaffolding. It is tempting because "generate" describes the outcome, and a generation verb would be the right choice if the CLI exposed one for producing boilerplate files.

  • ✗

    `ansible-galaxy collection create my_namespace.my_collection`

    Why it's wrong here

    `create` is not a valid `ansible-galaxy collection` subcommand; the CLI uses `init` to scaffold from a skeleton. It is tempting because "create" matches the task's wording, and a create verb would be the right choice if the tool exposed one for new collections.

  • ✗

    `ansible-galaxy collection start my_namespace.my_collection`

    Why it's wrong here

    `start` is not a valid `ansible-galaxy collection` subcommand, so the command fails. It is tempting because "start" suggests beginning a new project, and a start-style verb would be the right choice if the CLI used it to initialise a skeleton.

  • ✓

    `ansible-galaxy collection init my_namespace.my_collection`

    Why this is correct

    `ansible-galaxy collection init` scaffolds the namespace.collection skeleton, generating galaxy.yml, plugins, roles and docs directories. The stem requires creating a new collection from a template, and this subcommand is the only one that produces that structure rather than installing or building an existing collection.

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