This repo is just a sample to use for making custom execution environments to
use with ansible-navigator
and the rest of the Ansible Automation Platform.
Clone this repo to your workspace and manipulate the files to make your own changes for your project.
$ git clone https://github.com/Caseraw/ansible-builder-example-project.git
.
├── context [1]
│ ├── _build
│ │ ├── ansible.cfg
│ │ ├── bindep.txt
│ │ ├── requirements.txt
│ │ └── requirements.yml
│ └── Containerfile
├── ansible.cfg [2]
├── bindep.txt [3]
├── requirements.txt [4]
├── requirements.yml [5]
├── execution-environment.yml [6]
└── README.md
- The context directory is generated every
ansible-builder
build run and contains all the files for building the execution environment image. - The Ansible configuration file.
- File containing system-level dependencies to install during the multi staged build using bindep.
- File containing Python pip dependencies.
- File containing Ansible Roles and Collection dependencies.
- File containing the Ansible Builder definition file.
When ready, build the execution environment from within your project directory.
The ansible-builder
comes with several options, this example sticks to the
defaults.
$ ansible-builder build
Running command:
podman build -f context/Containerfile -t ansible-execution-env:latest context
Complete! The build context can be found at: /path/to/your/project/context
When the multi staged build is done, the following images should show up.
$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/ansible-execution-env latest 653a3b682ea3 45 minutes ago 895 MB [1]
<none> <none> cdeca837b865 45 minutes ago 1.12 GB [2]
<none> <none> 7085c4626412 46 minutes ago 831 MB [3]
quay.io/ansible/ansible-runner <none> f8c5935ee58c 3 hours ago 807 MB [4]
quay.io/ansible/ansible-builder <none> b0348faa7f41 6 weeks ago 779 MB [5]
- The newly built execution environment, packed in an Ansible Runner image.
- Multi staged image build artifact.
- Multi staged image build artifact.
- Original Ansible Runner image used for the build.
- Original Ansible Builder image used for the build.
For more information follow these links: