EX294 Practice Question: Create content collections and execution environments
A system administrator wants to build an Ansible execution environment using ansible-builder. Which file format is required to define the base image, dependencies, and additional Python packages for the build?
⚠ Common exam trap
Test-takers frequently confuse the build input file (`execution-environment.yml`) with the runtime configuration file (`ansible-navigator.yml`) or with the generated output (`Containerfile`), leading them to pick the wrong option.
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
`ansible-builder` requires an `execution-environment.yml` file to define the build context, including the base image (under `version: 1`), system-level dependencies (under `dependencies: system:`), and additional Python packages (under `dependencies: python:`). This file is the mandatory definition file for building an Ansible Execution Environment (EE) using `ansible-builder build`.
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, with its `dependencies` section specifying the base image, Galaxy collections, and Python packages. This directly satisfies the stem's requirement to define all three build inputs in one file, unlike an inventory or playbook.
- ✗
ansible-navigator.yml
Why it's wrong here
ansible-navigator.yml configures the navigator interface, including execution environment references, but ansible-builder reads an execution-environment.yml definition file for base image, dependencies and collections. The navigator file would be correct when customising navigator behaviour, not when defining a build.
- ✗
Containerfile
Why it's wrong here
A Containerfile defines the image build steps, but ansible-builder reads an execution-environment.yml to declare the base image, Galaxy dependencies and Python packages. The Containerfile is the generated output, not the input definition. Writing one by hand is valid only when bypassing ansible-builder entirely.
- ✗
requirements.yml
Why it's wrong here
requirements.yml lists Ansible collections or roles for Galaxy installation; it cannot declare a base image or Python packages, so ansible-builder cannot build from it. It is tempting because execution-environment.yml references it for collection dependencies, and it is the correct file when only Galaxy content must be pinned.
Go deeper
Related to this question
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 →
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.