Courseiva

EX294 Practice Question: Create content collections and execution environments

A DevOps engineer is creating an execution environment for a team that needs both Ansible and the 'requests' Python library. The engineer creates an execution environment definition file (EE.yml) with the following content: --- version: 3 images: base_image: name: registry.redhat.io/ansible-automation-platform-22/ee-minimal-rhel8:latest options: package_manager_path: /usr/bin/microdnf dependencies: python: requirements.txt system: bindep.txt

What is missing from this definition to ensure the 'requests' library is installed?

⚠ Common exam trap

The trap here is that candidates may focus on the package manager or base image details, overlooking that the Python dependency must be explicitly declared in the requirements.txt file referenced by the definition.

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

The requirements.txt file must contain 'requests'.

The execution environment definition file (EE.yml) specifies dependencies via external files like requirements.txt for Python packages. To install the 'requests' library, the requirements.txt file must explicitly list 'requests' as a dependency. Without it, the build process will not include the library, regardless of other configuration options.

Answer analysis

Option-by-option breakdown

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

  • The package_manager_path should be /usr/bin/yum.

    Why it's wrong here

    RHEL8 minimal uses microdnf.

  • The requirements.txt file must contain 'requests'.

    Why this is correct

    The requirements.txt file is referenced but the content is not shown; it must list requests.

  • The galaxy.yml file must be added to the dependencies section.

    Why it's wrong here

    Galaxy collections are separate from Python packages.

  • The base image should be ee-supported-rhel8 instead.

    Why it's wrong here

    ee-minimal is appropriate for custom builds.

About these practice questions

Courseiva writes every EX294 question from scratch — 520 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

Same concept, more angles

1 more way this is tested on EX294

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. An organization wants to include custom Python packages in their execution environment to support custom modules. Which method should be used to define these Python dependencies?

medium
  • A.List them in the `galaxy-requirements.yml` file.
  • B.Use `ansible-navigator` to install them during runtime.
  • C.Create a `requirements.txt` file and reference it in the `execution-environment.yml` under `dependencies: python:`.
  • D.Add them to the `collection-requirements.yml` file.

Why C: The `execution-environment.yml` file supports a `dependencies` key with a `python` subkey that points to a `requirements.txt` file. This is the standard method defined by the Ansible Builder specification for including custom Python packages in an execution environment, ensuring they are installed during the build process.

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.