Execution Environments Demystified: Build Once, Run Anywhere, Pin Every Version
Meet Ansible Builder
Ansible Builder is the tool that creates execution environment images. You write a small YAML config describing what the image needs (Python version, ansible-core version, collections, Python libraries, system packages), and Builder generates a Containerfile, runs the container build, and produces a tagged image you push to a registry.
Builder is a CLI tool, not a service. It runs on your laptop, a build server, or in CI. AWX itself doesn't run Builder; AWX only consumes the images Builder produces.
Container Basics in Three Terms
If you've never built a container before, three terms matter:
- Image: the blueprint. A tarball of layered filesystem changes and metadata. An image is static; it doesn't run.
- Container: a running instance of an image. AWX creates one per job and destroys it on exit.
- Build file: the recipe.
DockerfileorContainerfile(the names are interchangeable; both Docker and Podman read both). Lists the steps to assemble the image.
This is a small Dockerfile that uses ubuntu:24.04 as the base image, installs Node.js and npm, runs a Node.js application, and opens port 3000:
# syntax=docker/dockerfile:1
FROM ubuntu:24.04
WORKDIR /app
COPY . .
RUN apt-get update && apt-get install -y nodejs npm \
&& rm -rf /var/lib/apt/lists/*
EXPOSE 3000
CMD ["node", "src/index.js"AWX in Action
Ansible Orchestration at ScaleEnroll now to unlock all content and receive all future updates for free.
