Courseiva

EX294 Practice Question: Create content collections and execution environments

A system administrator wants to publish a custom Ansible collection to a private Automation Hub. What is the correct command to build the collection before publishing?

⚠ Common exam trap

It's easy for candidates to confuse the `publish` command (which uploads an existing tarball) with the `build` command (which creates the tarball), leading them to select option B instead of D.

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 build

`ansible-galaxy collection build` is the command that compiles the collection directory into a distributable tarball (e.g., `mycollection-1.0.0.tar.gz`), which is the required artifact for publishing to a private Automation Hub. Without this build step, there is no archive to upload.

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 mycollection

    Why it's wrong here

    Initializes a new collection skeleton.

  • ansible-galaxy collection publish ./mycollection-1.0.0.tar.gz

    Why it's wrong here

    Publishes an already-built collection.

  • ansible-galaxy collection install .

    Why it's wrong here

    Installs the collection, does not build a tarball.

  • ansible-galaxy collection build

    Why this is correct

    Builds a collection tarball from the current directory.

About these practice questions

Courseiva writes every EX294 question from scratch — 520 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 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.