Menu Close

Chapter 4. Building off of existing base EEs provided by Red Hat Ansible Automation Platform

4.1. Gathering system-level dependencies

The bindep format provides a way of specifying cross-platform requirements. A minimum expectation is that the collection(s) specify necessary requirements for [platform:rpm].

Below is an example of content from a valid bindep.txt file:

Example 4.1. A bindep.txt file

python38-devel [platform:rpm compile]
subversion [platform:rpm]
git-lfs [platform:rpm]

Entries from multiple collections will be combined into a single file. This will be processed by bindep and then passed to dnf. Only requirements with no profiles or no runtime requirements will be installed to the image.

4.2. Note for pip-based requirements

Python requirements files are combined into a single file using the requirements-parser library in order to support complex syntax. Entries from separate collections that give the same package name will be combined into the same entry, with the constraints combined.

There are several package names which are specifically ignored by ansible-builder; if a collection lists these, they will not be included in the combined file. These include test packages and packages that provide Ansible itself.

The full list can be found in EXCLUDE_REQUIREMENTS in the module.

4.3. Customizing an existing execution environment image

Ansible Controller ships with three default execution environments:

  • Ansible 2.9 - no collections are installed other than Controller modules
  • Minimal - contains the latest Ansible 2.11 release along with Ansible Runner, but contains no collections or other additional content
  • EE Supported - contains all Red Hat-supported content

While these environments cover many automation use cases, you can add additional items to customize these containers for your specific needs. The following procedure adds the kubernetes.core collection to the ee-minimal default image:


  1. Log in to via Podman:

    $ podman login -u="[username]" -p="[token/hash]"
  2. Pull an Automation Execution Environment image

    podman pull
  3. Configure your Ansible Builder files to specify any additional content to add to the new execution environment image which is based off of ee-minimal.

    1. For example, to add the Kubernetes Core Collection from Galaxy to the image, fill out the requirements.yml file as such:

        - kubernetes.core
    2. For more information on definition files and their content, refer to to definition file breakdown section.
  4. In the execution environment definition file, specify the filepath to the original ee-minimal container via the EE_BASE_IMAGE field. In doing so, your final execution-environment.yml file will look like the following:

    Example 4.2. A customized execution-environment.yml file

    version: 1
      EE_BASE_IMAGE: ''
      galaxy: requirements.yml

    Since this example uses the community version of kubernetes.core and not a certified collection from automation hub, we do not need to create an ansible.cfg nor reference that in our definition file.

  5. Build the new execution environment image using the following command:

    $ ansible-builder build -t[username]/new-ee

    where [username] specifies your username, and new-ee specifies the name of your new container image.

    1. Use the podman images command to confirm that your new container image is in that list:

      Example 4.3. Output of a podman images command with the image new-ee

      REPOSITORY          TAG     IMAGE ID      CREATED        SIZE
      localhost/new-ee    latest  f5509587efbb  3 minutes ago  769 MB
  6. Verify your newly-created execution environment image via Ansible Navigator
  7. Tag the image for use in your automation hub:

    $ podman tag[username]_/_new-ee_ [automation-hub-IP-address]/_[username]_/_new-ee_
  8. Log in to your automation hub using Podman:


    You must have admin or appropriate container repository permissions for automation hub to push a container. See Managing containers in private automation hub in the Red Hat Ansible Automation Platform documentation for more information.

    $ podman login -u="[username]" -p="[token/hash]" [automation-hub-IP-address]
  9. Push your image to the container registry in automation hub:

    $ podman push [automation-hub-IP-address]/_[username]_/_new-ee_
  10. Pull your new image into your automation controller instance:

    1. Navigate to automation controller
    2. From the side-navigational bar, click Administration > Execution Environments.
    3. Click Add.
    4. Enter the appropriate information then hit Save to pull in the new image.


      if your instance of automation hub is password or token protected, ensure that you have the appropriate container registry credential set up.