Get started with ansible-builder
Welcome to the Ansible Builder and Execution Environments workshop. This hands-on lab teaches you how to create and customize Ansible Execution Environments (EEs) for use in Automation Controller and other Ansible Automation Platform components.
Workshop Overview
In this workshop, you will learn how to use Ansible Builder to define, build, and manage execution environments that contain the exact dependencies needed for your automation. You’ll also learn how Ansible Builder integrates with Automation Hub, Automation Controller, and private registries to streamline automation at scale.
What You’ll Learn
By the end of this workshop, you will be able to:
-
Understand the purpose and structure of Execution Environments
-
Build a custom EE using
ansible-builder -
Include additional Python and system dependencies
-
Reference private Automation Hub collections
-
Use build arguments to handle certificates and secure registries
-
Troubleshoot and optimize your EE build process
-
Push and use the resulting EE in Automation Controller
Workshop Modules
This workshop is organized into six progressive modules:
| Module | Title | Focus Area |
|---|---|---|
1 |
Understand the components and purpose of EEs |
|
2 |
Learn how to create and inspect the EE build context |
|
3 |
Add Python, system, and collection requirements |
|
4 |
Connect to and pull collections from a private Hub |
|
5 |
Secure your builds and handle cert validation |
|
6 |
Push your EE to a registry and use it in Controller |
Lab Environment
Prerequisites
Before starting this workshop, ensure you have:
-
Basic understanding of Ansible concepts and playbooks
-
Familiarity with Automation Controller and Automation Hub
-
Access to the provided lab environment
Lab Access
The terminal window to your right is already logged into the lab environment as the devops user via SSH.
All steps in this lab should be completed as the devops user.
You have access to the following components:
-
VS Code: Integrated environment for editing EE definition files
-
Ansible Builder: Installed and ready for use
-
Automation Hub: Private hub with certified and validated collections
-
Podman/Buildah: Container tools for building and running EEs
-
Automation Controller: Configured to consume built EEs
Getting Started
To begin the workshop:
-
Open VS Code in your workspace
-
Review the
execution-environment.ymland supporting files -
Build your first EE using
ansible-builder build -
Explore the build context and output logs to understand each layer
|
You can re-run your build with increasing verbosity using the This is useful for debugging missing dependencies, certificate issues, or Hub authentication problems. |