Ansible Builder

3.1.1 · active · verified Tue Apr 14

Ansible Builder is a command-line utility for configuring and building portable, consistent, and customized Ansible control nodes, known as Execution Environments, packaged as containers by Podman or Docker. These Execution Environments are used with Ansible Automation Platform components like AWX or Ansible Controller, Ansible Navigator, or for local development. The current version is 3.1.1, and it maintains an active release cadence with significant updates between major versions, especially in its definition schema.

Warnings

Install

Quickstart

The quickstart involves defining an 'execution-environment.yml' file to specify dependencies (Ansible collections, Python packages, system packages), optional additional build steps, and the base image. Then, use the `ansible-builder build` command to create the container image. Ansible Builder defaults to using Podman as the container runtime, but Docker can be specified with `--container-runtime docker`.

# 1. Create an execution-environment.yml file:
# version: 3
# dependencies:
#   galaxy: requirements.yml
#   python: requirements.txt
#   system: bindep.txt
#
# 2. Create requirements.yml (for Ansible collections):
# collections:
#   - community.general
#
# 3. Create requirements.txt (for Python packages):
# ansible-lint
#
# 4. Create bindep.txt (for system-level packages):
# git [platform:rpm]
#
# 5. Build the Execution Environment image:
ansible-builder build --tag my-execution-environment --verbosity 1

view raw JSON →