EX294 Practice Question: Create content collections and execution environments
Which THREE files are commonly used when building an execution environment with ansible-builder?
⚠ Common exam trap
Red Hat often tests the misconception that `ansible.cfg` is part of the execution environment build process, but it is only used at runtime by Ansible, not by `ansible-builder` to construct the container image.
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
✓
bindep.txt
ansible-builder builds an execution environment from a definition directory, and the three commonly used input files are execution-environment.yml, requirements.txt, and bindep.txt. Option D (execution-environment.yml) is the main definition file that declares the base image, dependencies, and additional build steps for the execution environment. Option E (requirements.txt) lists the Python packages (such as ansible-core, ansible-runner, and collections' Python dependencies) to install into the image. Option A (bindep.txt) specifies system-level (RPM/OS) package requirements that must be installed in the container image. Option B (ansible.cfg) is an Ansible runtime configuration file and is not a standard ansible-builder input, and Option C (galaxy.yml) is a collection metadata file used when building or publishing Ansible collections, not for building 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.
- ✓
bindep.txt
Why this is correct
bindep.txt lists system-level package dependencies, which ansible-builder installs into the execution environment's base image before Python requirements. This satisfies the stem's need for build-input files: bindep.txt supplies OS packages, complementing requirements.txt and ansible.cfg as the three commonly used files.
- ✗
ansible.cfg
Why it's wrong here
ansible.cfg configures Ansible's runtime behaviour, not the execution environment build. The three files ansible-builder consumes are execution-environment.yml, requirements.yml and bindep.txt, which define base image, collections and system packages. ansible.cfg would be the right artefact when tuning inventory paths or connection defaults for playbook runs.
- ✗
galaxy.yml
Why it's wrong here
galaxy.yml describes an Ansible collection's metadata, not an execution environment build context, so ansible-builder ignores it. It is tempting because execution environments bundle collections, but the builder reads execution-environment.yml, requirements.yml and bindep.txt to assemble dependencies.
- ✓
execution-environment.yml
Why this is correct
The `execution-environment.yml` file defines the build specification: base image, dependencies, and collections. It satisfies the stem's requirement for files used when building an execution environment with `ansible-builder`, serving as the primary definition file that `ansible-builder build` consumes to construct the container image.
- ✓
requirements.txt
Why this is correct
The requirements.txt file lists Python dependencies installed into the execution environment image, satisfying the need to bundle libraries your playbooks or collections import. Ansible-builder reads it alongside execution-environment.yml and bindep.txt, ensuring runtime modules are present without manual pip installs inside containers.
Go deeper
Related to this question
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 →
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.