Ansible Development Containers with ansible-navigator
EX294 expects you to run playbooks from a development container. The measurement worth having is the comparison: the container carries a newer ansible-core than the control node and far fewer collections, which is the whole argument for execution environments and looks like a fault until you see why.
Bonus: Beyond the Blueprint Guide 45 of 45 Advanced
- OSUbuntu 26.04 LTS
- ansible-core2.20.1
- Python3.14.4
- TimeAbout 16 min
community-ansible-dev-tools is the development image - ansible-core plus ansible-lint, molecule and ansible-builder, at 1.39 GB. community-ee-minimal is the runtime image at 445 MB. Develop in the first, ship with something closer to the second.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| ANS-CTL01 | 192.168.0.36 | Ubuntu 26.04 LTS | Ansible Control Node | 2 Core | 3 GB | 50 GB |
| ANS-A01 | 192.168.0.37 | Ubuntu 26.04 LTS | Managed Node (group: web) | 2 Core | 3 GB | 50 GB |
| ANS-B01 | 192.168.0.38 | Ubuntu 26.04 LTS | Managed Node (group: db) | 2 Core | 3 GB | 50 GB |
This guide includes
Use this when the toolchain has to live in a container rather than on the control node. This matters because the development image carries a different Ansible than the host does - and it does not inherit your shell's environment.
- comparing the two images, and what each of them is for
- confirming the control node does not have the toolchain at all
- finding the container does, and that it is not the same Ansible
- seeing that your project is already mounted inside it
- linting and running the playbook in that container, and finding what it does not inherit
Before you start
- A control node configured as shown in the first step.
podmanandansible-navigator, with both images already pulled.
-
The configuration this guide assumes
-
Two images, two jobs
-
The control node does not have the toolchain
-
The container does, and it is not the same Ansible
-
Your project is already inside it
-
Lint the playbook you actually have
-
Run the playbook in the same container
-
What it does not inherit