EX294 Practice Question: Create content collections and execution environments
When building an execution environment with ansible-builder, a developer notices that the build process fails with an error about missing dependencies. The developer wants to ensure all required Python packages are installed in the execution environment. Which file should be used to specify additional Python packages?
⚠ Common exam trap
It's easy for candidates to confuse `bindep.txt` (for system packages) with `requirements.txt` (for Python packages), as both are used in execution environment builds but serve different dependency types.
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
✓
requirements.txt
In Ansible Builder, the `requirements.txt` file is used to specify additional Python packages that should be installed in the execution environment. When building an execution environment, Ansible Builder reads this file and installs the listed packages via pip, ensuring all required Python dependencies are present.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
meta/runtime.yml
Why it's wrong here
meta/runtime.yml declares collection metadata such as requires_ansible and action plugin routing; it holds no Python dependency list, so ansible-builder installs nothing from it. It is tempting because it lives in the collection and is edited during development, and would be the right place to set the minimum Ansible version.
- ✗
galaxy.yml
Why it's wrong here
galaxy.yml describes collection metadata for publishing, including name, version and dependencies on other collections; it does not install Python packages. It is tempting because it is a manifest file listing dependencies, and would be correct when declaring which Ansible collections the build must include.
- ✗
bindep.txt
Why it's wrong here
bindep.txt lists system-level packages for the build host, not Python packages, so it cannot resolve missing Python dependencies. It is tempting because it is a recognised ansible-builder dependency file, and would be correct when the execution environment needs OS libraries such as gcc or libxml2.
- ✓
requirements.txt
Why this is correct
Listing Python packages in requirements.txt lets ansible-builder install them into the execution environment image during the build, resolving the missing-dependency failure. The bindep.txt file handles system-level packages instead, so requirements.txt is the correct file for the Python dependencies the stem requires.
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.