👋 Introduction

This lab is an update on the ansible-builder lab that we released earlier. Execution environment builder (ansible-builder) was updated to version 3.0 with the Ansible Automation Platform 2.4 release.

V3.0 of ansible-builder makes the process of building your own execution environments more efficient by allowing a lot of customizations through the execution environment definition file.

In this lab, we will explore the new features of ansible-builder 3.0 and how you can use these features to create your own execution environments.

☑️ Task - Understand the different tabs available in the lab

On the left hand side, you will see different tabs available to you in this lab:

  • VS Code - We will use this tab to create our execution-environment definition files and run ansible-builder to create new execution environments locally. You will see a VS Code Interface on this tab that will be used as the developer IDE to create files.

  • Automation Hub - This tab shows you the Automation Hub setup for this lab environment. This hub will act as the source for the content collections that we want to bake into our execution environments, as well as the destination for the new execution environments that we create through ansible-builder.

☑️ Task - Log into the Automation Hub

Click on the Automation Hub tab.

Username:

admin

Password:

ansible123!

Once you log in, you can find the content collections available in different repositories on this Automation Hub.

Click on Validated or Red Hat Certified to see the list of content collections available on this Automation Hub.

☑️ Task - Get Familiar with ansible-builder CLI

This simple task is to take you through the command line interface of ansible-builder. We will not go into too much detail here, but we want you to understand how to interact with ansible-builder.

Click on the VS Code tab, then click on the Terminal option on the toolbar and select New Terminal to open a new terminal.

image

This will open a new terminal window below the editor window in VS Code.

Let’s run some quick commands on this terminal (you can copy-paste or write these commands manually):

ansible-builder --version

The above command gives you the version of ansible-builder installed on the lab machine. For this lab, that is 3.0.0, which should also be visible in the command output.

ansible-builder --help

This command will give you help output of ansible-builder. From the output, you can see three subcommands available. For this lab, as we are focusing mainly on building execution environments, the build subcommand is important.

ansible-builder build --help

This command gives you the help section on the build subcommand of ansible-builder. Please briefly take a look at these different options as they will be used throughout this lab.

✅ Next Challenge

Press the Next button below to go to the next challenge once you’ve completed the tasks.

🐛 Encountered an issue?

If you have encountered an issue or have noticed something not quite right, please open an issue here: