Courseiva

EX294 · topic practice

Create content collections and execution environments practice questions

This domain covers Ansible content collections and execution environments on Red Hat Ansible Automation Platform. You must know how to build, version, and publish collections to Automation Hub or a private automation hub, and how execution environments package collections, Python dependencies, and ansible-core into container images. Questions test real commands, versioning rules, and the roles of ansible-galaxy and ansible-builder.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Create content collections and execution environments

What the exam tests

What to know about Create content collections and execution environments

Be able to build and publish a collection with ansible-galaxy, bump its version before republishing, and build an execution environment with ansible-builder. The single most important thing: a published collection version is immutable, so update the version in galaxy.yml before publishing again.

Using ansible-galaxy collection build and ansible-galaxy collection publish to package and upload collections

Incrementing the collection version in galaxy.yml before republishing an already-published collection

Uploading collections to a private automation hub with ansible-galaxy collection publish and an API token

Building execution environments with ansible-builder and an execution-environment.yml definition file

Watch out for

Common Create content collections and execution environments exam traps

  • ▸Trying to republish a collection with the same version already on Automation Hub instead of bumping the version in galaxy.yml first
  • ▸Confusing collection publishing commands with execution environment build commands, or forgetting the required API token and server URL
  • ▸Assuming execution environments only contain collections, ignoring Python dependencies and ansible-core pinned in the definition file

Practice set

Create content collections and execution environments questions

20 questions · select your answer, then reveal the explanation

Question 1mediummultiple choice
Read the full Ansible explanation →

An organization uses custom Ansible plugins stored in a collection. A junior admin reports that after updating the collection to version 2.0.0, a playbook that uses a custom filter plugin fails with 'undefined filter'. What is the most likely cause?

Question 2easymultiple choice
Read the full Ansible explanation →

A user wants to run a playbook that uses a module from 'myorg.mycollection'. The playbook is located in /home/user/projects. Which of the following is true about the collection discovery?

Exhibit

Refer to the exhibit.

$ ansible-galaxy collection list

# /home/user/.ansible/collections/ansible_collections
Collection                       Version
-------------------------------- -------
community.general                5.0.0
myorg.mycollection               1.2.3

# /usr/share/ansible/collections/ansible_collections
Collection                       Version
-------------------------------- -------
redhat.insights                  1.0.0

What is the most likely cause of the build failure?

Exhibit

Refer to the exhibit.

$ cat execution-environment.yml
---
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:
  galaxy: requirements.yml
  python: requirements.txt
  system: bindep.txt

$ cat requirements.txt
ansible
requests

$ cat bindep.txt
python3-devel [platform:rpm]
gcc [platform:rpm]

$ ansible-builder build -f execution-environment.yml

Build fails with: 'Error: No matching package to install: python3-devel'.
Question 4hardmultiple choice
Read the full Ansible explanation →

You are an automation engineer at a large enterprise. The company uses Ansible Automation Platform 2.x and has a private Automation Hub server. The security team mandates that all execution environments must be built from a hardened base image that has been approved by the security team. The base image is stored in a private container registry at registry.internal.company.com/hardened-ee:latest. You need to create an execution environment that includes a custom collection 'company.tools' which is hosted on the private Automation Hub. Additionally, the execution environment must include the Python library 'cryptography' version 3.4.8. You have created the following files:

execution-environment.yml: --- version: 3 images: base_image: name: registry.internal.company.com/hardened-ee:latest options: package_manager_path: /usr/bin/microdnf dependencies: galaxy: requirements.yml python: requirements.txt

requirements.yml: --- collections: - name: company.tools source: https://automationhub.company.com/api/galaxy/content/private/

requirements.txt:

cryptography==3.4.8

When you run 'ansible-builder build -f execution-environment.yml', the build fails with an error: 'Error: Failed to resolve dependency cryptography==3.4.8'. Based on this scenario, what is the most likely cause of the failure?

Question 5hardmultiple choice
Read the full Ansible explanation →

A user runs the commands shown in the exhibit. The execution environment (EE) builds successfully but the playbook run fails with the error. What is the most likely cause?

Network Topology
ANSIBLE_GALAXY_CLI_COLLECTION_OPTS: "pre"$ ansible-navigator run playbook.ymleei my-ee:latestpp neverce path/to/collectionsRefer to the exhibit.$ ansible-builder build -f execution-environment.ymlversion: 1build_arg_defaults:ansible_config: ansible.cfg...$ cat ansible.cfg[defaults]collections_path = ./collections$ ls collections/ansible_collections/community.general/
Question 6easymultiple choice
Read the full Ansible explanation →

You are a Red Hat Certified Engineer tasked with creating a content collection for your organization. The collection will contain roles and modules used by multiple teams. The requirements are: (1) The collection must follow the Ansible community structure. (2) It must include a module that manages network devices. (3) The collection must be versioned and published to Automation Hub. (4) You must provide a minimal working example for other developers. After initial development, you run 'ansible-galaxy collection build' and it fails with 'ERROR! Unknown file type in collection: .gitkeep'. The collection directory contains:

- galaxy.yml - plugins/modules/network_config.py - roles/network/ - tests/ - .gitkeep (in tests/)

What single action should you take to resolve the build error?

Question 7mediummultiple choice
Study the full Python automation breakdown →

A developer creates a collection and wants to ensure it includes a required Python library for a module. Where should this dependency be declared?

Question 8hardmultiple choice
Read the full Ansible explanation →

An organization uses a private Git repository to store Ansible content collections. They want to automate the building of execution environments that include these collections. Which approach is recommended?

Question 9mediummultiple choice
Read the full Ansible explanation →

An execution environment fails to start because the container image is missing the ansible-runner package. Which step in the build process should have included it?

Which THREE actions are required to successfully publish a collection to Automation Hub?

Refer to the exhibit. A user includes this in the execution-environment.yml. The build process fails because the second collection cannot be resolved. What is the most likely reason?

Exhibit

collections:
  - name: namespace.collection
    version: ">=1.0.0,<2.0.0"
  - name: other.collection
    source: https://internal.galaxy.example.com/api/
Question 12hardmultiple choice
Read the full Ansible explanation →

A developer is building an execution environment using `ansible-builder` and encounters the error: 'Error: Failed to pull base image: manifest for registry.redhat.io/ansible-automation-platform/ansible-builder-rhel8:2.0.0 not found: manifest unknown.' The developer checks the registry and verifies that the image exists with a different tag. Which action should the developer take to resolve the issue?

An organization wants to share a collection internally across multiple teams while ensuring that each team can only use specific modules from the collection. Which approach best supports this requirement?

A developer has created a collection and needs to publish it to a private Automation Hub. Which command should be used to upload the collection archive?

Question 15mediummultiple choice
Read the full Ansible explanation →

A team uses `ansible-navigator` to run playbooks with an execution environment. The playbook requires a collection that is not included in the execution environment. Which approach allows the team to use the collection without rebuilding the execution environment?

Question 16mediummulti select
Read the full Ansible explanation →

Which TWO of the following are required in a valid Ansible collection directory structure?

Question 17hardmulti select
Read the full Ansible explanation →

Which THREE of the following are valid directives that can be used in an `execution-environment.yml` file for `ansible-builder`?

Which TWO of the following are valid methods to install a collection from a private Automation Hub?

Based on the exhibit, which collection provides modules for managing Red Hat Insights subscriptions?

Exhibit

Refer to the exhibit.

```
$ ansible-galaxy collection list

# /home/user/.ansible/collections/ansible_collections
Collection                   Version
---------------------------- -------
community.general             5.0.0
redhat.insights               1.0.0
ansible.posix                 1.3.0
```
Question 20hardmultiple choice
Read the full Ansible explanation →

An execution environment is built using ansible-builder. The definition file includes a base image from registry.redhat.io. After building, the container runs but ansible-navigator can't find the EE. What is the most likely cause?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Create content collections and execution environments sessions

Start a Create content collections and execution environments only practice session

Every question in these sessions is drawn from the Create content collections and execution environments domain — nothing else.

Related practice questions

Related EX294 topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the EX294 exam test about Create content collections and execution environments?
Be able to build and publish a collection with ansible-galaxy, bump its version before republishing, and build an execution environment with ansible-builder. The single most important thing: a published collection version is immutable, so update the version in galaxy.yml before publishing again.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Create content collections and execution environments questions in a focused session?
Yes — the session launcher on this page draws every question from the Create content collections and execution environments domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other EX294 topics?
Use the topic links above to move to related areas, or go back to the EX294 question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the EX294 exam covers. They are not copied from any real exam or dump site.