Building your first Execution Environment¶
We are going to build an EE that represents an Ansible control node containing standard packages such as
ansible-core and Python in addition to an Ansible collection (
community.postgresql) and its dependency (the
psycopg2-binary Python connector).
To build your first EE:
Create a project folder on your filesystem.
execution-environment.ymlfile that specifies dependencies to include in the image.
psycopg2-binaryPython package is included in the
requirements.txtfile for the collection. For collections that do not include
requirements.txtfiles, you need to specify Python dependencies explicitly. See the Ansible Builder documentation for details.
Build a EE container image called
If you use docker, add the
List container images to verify that you built it successfully.
You can verify the image you created by inspecting the
Dockerfile in the
context directory to view its configuration.
You can also use Ansible Navigator to view detailed information about the image.
ansible-navigator command, type
:images in the TUI, and then choose
Proceed to Running your EE and test the EE you just built.
- Running a local container registry for Execution Environments in the Ansible community forum explains how to set up a local registry for your Execution Environment images.