Courseiva

EX294 Practice Question: Create content collections and execution environments

An admin wants to build an execution environment using ansible-builder. Which file is required to define the base image and additional Python dependencies?

⚠ Common exam trap

Red Hat often tests the distinction between files used by different Ansible tools—candidates confuse `requirements.yml` (for collections/roles) or `galaxy.yml` (for collection metadata) with the `execution-environment.yml` file that is specifically required by `ansible-builder`.

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

✓

execution-environment.yml

`execution-environment.yml` is the required file for `ansible-builder` to define the base image (via the `base_image` field) and additional Python dependencies (via the `python` section under `dependencies`). This YAML file serves as the build definition that `ansible-builder` reads to construct the container image, making it essential for creating custom execution environments.

Answer analysis

Option-by-option breakdown

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

  • ✓

    execution-environment.yml

    Why this is correct

    The execution-environment.yml file is the definition file ansible-builder consumes, specifying the base image and Python dependencies under its build and dependencies keys. Without it, ansible-builder has no blueprint to construct the execution environment, so it satisfies the requirement to declare both the base image and additional Python packages.

  • ✗

    requirements.yml

    Why it's wrong here

    requirements.yml lists Ansible collections and roles for installation, not Python packages or the base image. Those belong in execution-environment.yml. It is the correct file when installing Galaxy content into a project or execution environment via ansible-galaxy, but it cannot declare a base image.

  • ✗

    galaxy.yml

    Why it's wrong here

    galaxy.yml holds collection metadata such as namespace, version and dependencies for packaging a collection, not execution environment configuration. It is the right file when building or publishing an Ansible collection, yet it defines no base image or Python dependency list for ansible-builder.

  • ✗

    Dockerfile

    Why it's wrong here

    A Dockerfile is the build output ansible-builder generates, not the input defining dependencies; ansible-builder writes it from execution-environment.yml. Hand-writing one bypasses the tool's dependency resolution. It is used when constructing container images manually with podman or docker build, where no Ansible-specific metadata is needed.

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.