Courseiva

EX294 Practice Question: Create content collections and execution environments

Exhibit

Refer to the exhibit.

```yaml
# execution-environment.yml
---
version: 1
build_arg_defaults:
  EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform/ansible-builder-rhel8:latest'
dependencies:
  galaxy: requirements.yml
  python: requirements.txt
  system: bindep.txt
```

Based on the exhibit, what is the purpose of the `galaxy` dependency entry?

⚠ Common exam trap

Red Hat often tests the distinction between `galaxy` (for Ansible collections) and `python` (for pip packages) in the `dependencies` section, leading candidates to confuse the two or assume `galaxy` installs Python packages.

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

✓

Define which Ansible collections to install in the execution environment.

In the context of Ansible execution environments (EEs), the `galaxy` key within the `dependencies` section of the `execution-environment.yml` file specifies a list of Ansible collections to be installed from Ansible Galaxy or an Automation Hub. This allows the EE to include the necessary content collections required for playbook execution, ensuring all roles and modules are available inside the container.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Set the base container image.

    Why it's wrong here

    The galaxy entry names an Ansible collection dependency, not a container base image; base images are declared via the containers' image references in the execution environment definition. It is tempting because dependency resolution and image layering both concern build inputs, but galaxy resolves role or collection sources, which is correct when a playbook requires external collections.

  • ✓

    Define which Ansible collections to install in the execution environment.

    Why this is correct

    The `galaxy` entry specifies Ansible collections and roles that the execution environment must include, satisfying the requirement to declare dependencies for the automation content. During image build, ansible-builder reads this key and installs the listed collections into the container, ensuring the playbook's modules are available at runtime.

  • ✗

    Specify Python packages to install via pip.

    Why it's wrong here

    The galaxy dependency resolves Ansible roles and collections from Galaxy or a requirements file, not Python packages, which the pip module handles. It is tempting because both install external content, and would be correct for provisioning Python libraries inside a virtual environment.

  • ✗

    Configure environment variables for the container.

    Why it's wrong here

    The galaxy dependency installs Ansible roles or collections from Galaxy, not container environment variables, which belong in a task using the environment keyword. It is tempting because dependencies configure content, and would be correct for managing runtime variables passed to a launched process.

About these practice questions

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