Courseiva

EX294 Practice Question: Create content collections and execution environments

Which file is required to define the content of an Ansible execution environment when using ansible-builder?

⚠ Common exam trap

Many candidates confuse the generated `Dockerfile` (an output artifact) with the required input file, or they assume `requirements.yml` is the main definition because it is commonly used for collection installation in playbooks, but `ansible-builder` specifically requires `execution-environment.yml` as the blueprint.

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

The `execution-environment.yml` file is the required definition file for `ansible-builder` because it specifies the base image, custom dependencies (Python, system, or collections), and additional build instructions needed to construct a containerized Ansible execution environment. Without this file, `ansible-builder` has no manifest to process, as it is the sole input that defines the environment's content.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Dockerfile

    Why it's wrong here

    A Dockerfile describes a container image build, but ansible-builder generates one from its own definition rather than consuming a hand-written Dockerfile as the environment specification. It is tempting because execution environments are container images, and a Dockerfile would be correct when building an image directly without ansible-builder.

  • ✗

    requirements.yml

    Why it's wrong here

    requirements.yml lists Ansible collections and roles to install, but it cannot specify the base image, system packages or Python dependencies that define the execution environment. It is tempting because it is a genuine ansible-builder input file, and would be correct for declaring only the collections a playbook requires.

  • ✗

    ansible.cfg

    Why it's wrong here

    ansible.cfg configures Ansible's own runtime behaviour, such as inventory paths and connection defaults; ansible-builder does not read it to determine execution environment contents. It is tempting because it is the standard configuration file for Ansible, and would be correct when adjusting controller settings rather than building an image.

  • ✓

    execution-environment.yml

    Why this is correct

    The execution-environment.yml file defines an execution environment's content, specifying the base image, Galaxy dependencies, Python requirements and additional build files that ansible-builder consumes. Without it, ansible-builder has no definition to construct the container image from.

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.