Courseiva

EX294 Practice Question: Create content collections and execution environments

Which TWO statements about Ansible content collections are correct?

⚠ Common exam trap

Red Hat often tests the requirement for a `galaxy.yml` file in the collection root, as candidates may mistakenly think it is optional or confuse it with other configuration files like `meta/main.yml`.

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

✓

Collections can be distributed via Automation Hub or Galaxy.

Option C is correct because Ansible content collections can be obtained from both public Ansible Galaxy and Red Hat Automation Hub (as well as private Automation Hub instances), which are the standard distribution sources configured via ansible.cfg or the ansible-galaxy CLI. Option E is correct because a collection's source tree requires a galaxy.yml metadata file at its root, which defines the namespace, name, version, authors, and dependencies used when building and publishing the collection artifact. Option A is wrong because collections can also be installed from Automation Hub, private automation hubs, Git repositories, tarballs, or local paths, not only Galaxy. Option B is wrong because a collection name uses the format namespace.collection (for example, ansible.builtin), so it must include a namespace rather than being a single word. Option D is wrong because collections can contain many content types beyond roles and playbooks, including modules, plugins, filters, tests, and documentation.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Collections can be installed only from Galaxy.

    Why it's wrong here

    Collections can also be installed from Automation Hub, private automation hub, Git repositories, or local tarballs via ansible-galaxy, so 'only from Galaxy' is false. Galaxy is the default public source, making it the tempting answer when no other repository is configured.

  • ✗

    The collection name must be a single word without namespace.

    Why it's wrong here

    Collection names use a namespace.collection format, for example ansible.builtin, so a single word without namespace is invalid. The temptation comes from older standalone role names, which were single words, but collections require the namespace prefix.

  • ✓

    Collections can be distributed via Automation Hub or Galaxy.

    Why this is correct

    Collections are distributed as tarballs through Galaxy, Automation Hub, or private Galaxy servers, which is the standard distribution mechanism. This satisfies the statement's requirement, distinguishing collections from standalone roles shared via Git or Galaxy alone.

  • ✗

    A collection can contain only roles and playbooks.

    Why it's wrong here

    Collections bundle roles, playbooks, plugins, modules and documentation, so restricting them to roles and playbooks is false. The temptation arises because roles and playbooks are the most visible content, yet plugins and modules are equally valid collection members.

  • ✓

    A collection must have a galaxy.yml file in its root directory.

    Why this is correct

    galaxy.yml at the collection root defines metadata such as namespace, name, version and dependencies, and is required for building and publishing. This satisfies the statement's requirement, as Ansible Galaxy rejects collections lacking this manifest file.

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.