Courseiva

EX294 Practice Question: Create content collections and execution environments

A user wants to build an execution environment from a definition file. Which command is used?

⚠ Common exam trap

It's easy for candidates to confuse `ansible-builder` with `ansible-galaxy` or `ansible-playbook`, mistakenly thinking that building an execution environment uses the same command as building a collection or running a playbook.

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

✓

ansible-builder build -f execution-environment.yml

The `ansible-builder build` command is the correct tool for building an Ansible execution environment from a a definition file. The `-f` flag specifies the path to the `execution-environment.yml` file, which defines the base image, required collections, and system dependencies for the containerized environment.

Answer analysis

Option-by-option breakdown

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

  • ✗

    ansible-playbook build -i ee.yml

    Why it's wrong here

    ansible-playbook runs playbooks against inventory; it does not build execution environments. The build subcommand belongs to ansible-builder, which reads an execution environment definition file. ansible-playbook would be correct for executing automation tasks, not for constructing container images.

  • ✓

    ansible-builder build -f execution-environment.yml

    Why this is correct

    The ansible-builder CLI is the supported tool for turning an execution-environment definition file into a container image. The build subcommand reads the YAML definition via -f, resolving collections and Python dependencies, then produces the image Ansible Automation Platform uses to run playbooks.

  • ✗

    ansible-execution-environment build -f ee.yml

    Why it's wrong here

    No ansible-execution-environment command exists in the Ansible toolset. Execution environments are built with ansible-builder, which consumes the definition YAML. A similarly named CLI would be the right choice only if such a tool shipped, but it does not.

  • ✗

    ansible-galaxy build execution-environment.yml

    Why it's wrong here

    ansible-galaxy manages roles and collections, not execution environment images. Building an EE from a definition file is performed by ansible-builder. ansible-galaxy would be correct for installing or scaffolding roles and collections, which is unrelated to image construction.

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.