In the previous lesson you left Aurora Store with protected credentials, team-based permissions and a release workflow with an approval step. But all those jobs run in the generic execution environment that comes with AWX: a container image with an ansible-core version, some collections and some Python libraries that Aurora hasn't chosen and that can change with any AWX upgrade. Meanwhile, in your terminal you're still using the pipx installation from Lesson 1.2. That's two different environments for the same code: exactly the "it works on my machine" problem that Module 6 solved for dependencies. In this lesson you'll close that gap: you'll understand what an execution environment (Execution Environment, EE) is, build the aurora-ee image with ansible-builder containing exactly what Aurora needs, publish it to the lab's container registry (registry.aurora-store.example), use it in AWX and, with ansible-navigator, run site.yml in your terminal inside the same image.
Contents
- Why execution environments
- What's inside an EE and what AWX uses today
- Available base images
- The tools:
ansible-builder,ansible-navigatorand Podman - The definition:
execution-environment.yml(version 3) - Building and tagging
aurora-ee - Inspecting the image
- The lab's container registry
- Publishing
aurora-ee - Using
aurora-eein AWX ansible-navigator: running locally inside the EE- Interactive mode and artifacts
ansible-navigator.yml: the configuration in the repositoryansible-playbookvs.ansible-navigator- Versioning and updating the EE
- Why execution environments
An Aurora playbook depends on much more than its YAML files:
| Dependency | Example at Aurora | Where it lives on your computer today |
|---|---|---|
ansible-core version |
2.17 | pipx installation |
| Control node Python version | 3.11 or later | Operating system |
| Collections | community.general 12.6.7, community.postgresql 4.2.2, ansible.posix 2.2.2 |
The project's collections/ |
| Control node Python libraries | Whatever the plugins and lookups need (and psycopg2 if any PostgreSQL module runs locally) |
pipx inject or the system |
| System packages | ssh client, git |
Operating system |
Before EEs, Tower used Python virtual environments on the server, which had to be maintained by hand on each node and never quite matched the ones on people's laptops. An execution environment is a container image that packages all of the above. Its advantages:
- Reproducible: the same image (identified by its tag or its digest) gives the same result today and a year from now.
- The same everywhere: your terminal (with
ansible-navigator), AWX, continuous integration (Lesson 8.3) and your colleagues all use the same image. - Isolated: each project can have its own EE with its own versions, without conflicts with the others.
- Distributable: it's published to a container registry like any other image.
flowchart LR
DEF[ee/execution-environment.yml<br/>+ collections/requirements.yml] -->|ansible-builder build| IMG[aurora-ee:1.0.0 image]
IMG -->|podman push| REG[(registry.aurora-store.example)]
REG -->|pull| AWX[AWX: Aurora jobs]
REG -->|pull| NAV[Your terminal:<br/>ansible-navigator]
REG -->|pull| CI[Continuous integration<br/>Lesson 8.3]
- What's inside an EE and what AWX uses today
An EE is a regular container image that contains, at a minimum:
- a Python interpreter;
ansible-core(theansible-playbook,ansible-galaxy… executables);ansible-runner, the layer AWX andansible-navigatoruse to launch Ansible and collect its events;- the collections and their Python and system dependencies.
EEs do not contain your playbooks, your inventory or your secrets: those are mounted or injected at run time. Nor do they need to contain the roles (Aurora still gets them from the project).
Until now, Aurora's jobs in AWX have used the installation's default EE (in AWX, a quay.io/ansible/awx-ee image with the tag matching the installed version, or latest). You can see which one in the details of any job (Execution Environment), and the Ansible version it contains by launching a template with verbosity 1: the first line of the output is ansible-playbook [core 2.x.y]. That image comes with lots of collections "just in case" and changes whenever AWX changes: Aurora controls none of it.
- Available base images
A custom EE is built on top of a base image. The usual ones:
| Image | What it contains | When to use it |
|---|---|---|
A system image (for example quay.io/centos/centos:stream9) |
Just the system; ansible-builder installs Python, ansible-core and ansible-runner |
Full control over versions (chosen by Aurora) |
ghcr.io/ansible-community/community-ee-minimal |
ansible-core and ansible-runner, no collections |
A quick starting point from the community |
ghcr.io/ansible-community/community-ee-base |
The above plus a small set of basic collections | Tests and general use |
quay.io/ansible/awx-ee |
AWX's default EE, with many collections | What AWX uses if you don't choose another one |
Red Hat ee-minimal-rhel9 / ee-supported-rhel9 |
Supported AAP images (require a subscription and access to registry.redhat.io) |
Environments with AAP |
Aurora's decision: start from quay.io/centos/centos:stream9 and explicitly specify Python 3.11 and ansible-core from the 2.17 series, the same as in your terminal, so that the collections pinned in Module 6 (chosen for their compatibility with 2.17) behave the same everywhere.
- The tools:
ansible-builder, ansible-navigator and Podman
ansible-builder, ansible-navigator and Podmanansible-buildergenerates aContainerfileand a context directory from a definition file, and builds the image with Podman or Docker.ansible-navigatorruns playbooks (and other Ansible utilities) inside an EE, with an interactive text interface or with classic output.- Podman is the container engine both of them will use (Docker works too).
Install them on your computer, just like ansible in Lesson 1.2:
sudo apt-get install -y podman
pipx install ansible-builder
pipx install ansible-navigator
ansible-builder --version
ansible-navigator --version
podman --versionBoth tools are part of the Ansible development tools; in AAP they're distributed with support.
- The definition:
execution-environment.yml (version 3)
execution-environment.yml (version 3)In aurora-infra, create the ee/ directory and, inside it, ee/execution-environment.yml:
---
# Aurora Store execution environment (Lesson 7.6).
# Build from the root of aurora-infra:
# ansible-builder build -f ee/execution-environment.yml -c ee/context
# Change the tag (options.tags) for every new version: published tags are never reused.
version: 3
images:
base_image:
name: quay.io/centos/centos:stream9
dependencies:
# Control node Python inside the container.
python_interpreter:
package_system: python3.11
python_path: /usr/bin/python3.11
# Same series as on the laptop (Lesson 1.2) and compatible with the pinned collections.
ansible_core:
package_pip: ansible-core>=2.17,<2.18
ansible_runner:
package_pip: ansible-runner
# The SAME collections and versions as the project (a single source of truth).
galaxy: ../collections/requirements.yml
# Additional Python libraries.
python:
- psycopg2-binary
# System packages (bindep format).
system:
- openssh-clients [platform:rpm]
- git-core [platform:rpm]
options:
package_manager_path: /usr/bin/dnf
tags:
- registry.aurora-store.example:5000/aurora/aurora-ee:1.0.0Explanation, block by block:
version: 3: the current format of theansible-builder3.x definition file. Versions 1 and 2 are older and have a different structure.images.base_image.name: the starting image.dependencies.python_interpreter: which system package installs Python (python3.11) and where the executable ends up.ansible-core2.17 needs Python 3.10 or later on the control node, and CentOS Stream 9's default Python is 3.9.dependencies.ansible_coreandansible_runner: installed withpip. Foransible-core, the whole 2.17 series is specified: at build time, the latest patch release of that series will be installed, and the tagged image freezes that specific version (you'll see it in section 7).dependencies.galaxy: a collection requirements file. It points to../collections/requirements.yml(relative paths are resolved from the definition file's directory): collection versions are declared only once in the repository, and they're used by your terminal, the project sync in AWX and the EE. A list written right here is also accepted, but that would mean duplicating information.dependencies.python: Python packages, inrequirements.txtformat.psycopg2-binaryis the precompiled variant ofpsycopg2, the library thecommunity.postgresqlmodules use: it doesn't need a compiler. (Note: Aurora's PostgreSQL modules run ondb1, which already haspython3-psycopg2since Lesson 3.4; in the EE it's needed whenever some module or lookup runs on the control node.) In addition,ansible-builderreads the requirements files declared by the collections themselves and adds their dependencies automatically.dependencies.system: system packages in bindep format, with a platform filter ([platform:rpm]= only on RPM-based distributions). The SSH client is essential for connecting to the servers;gitis used by someansible-galaxyoperations.options.package_manager_path: the base image's package manager (dnf).options.tags: the tag (full name) of the resulting image: registry, path and version.
Other sections that exist and Aurora doesn't use: additional_build_files (copy files into the context, for example an ansible.cfg with private Galaxy servers), additional_build_steps (extra Containerfile instructions at various points: prepend_base, append_final…) and build_arg_defaults.
Add the context directory generated by the build to .gitignore:
- Building and tagging
aurora-ee
aurora-eeFrom the root of aurora-infra:
-f: the definition file.-c: directory where the build context is generated (Containerfileand auxiliary files). You can openee/context/Containerfileto see exactly what gets built.-v 2: more detailed output.- Podman is used by default; with Docker, add
--container-runtime docker.
The build takes several minutes: it pulls the base image, installs Python, ansible-core and ansible-runner, downloads the collections with ansible-galaxy, installs their Python and system dependencies, and assembles the final image in several stages. When it finishes:
- Inspecting the image
Before publishing it, check that it contains what you expect by running commands inside it:
IMG=registry.aurora-store.example:5000/aurora/aurora-ee:1.0.0
podman run --rm "$IMG" ansible --version
podman run --rm "$IMG" ansible-galaxy collection list
podman run --rm "$IMG" python3.11 -c "import psycopg2; print(psycopg2.__version__)"ansible [core 2.17.x]
...
python version = 3.11.x ...
# /usr/share/ansible/collections/ansible_collections
Collection Version
-------------------- -------
ansible.posix 2.2.2
community.general 12.6.7
community.postgresql 4.2.2Write down the exact ansible-core version that ended up in the image: it's the one every job with aurora-ee:1.0.0 will run. Also note the collections path, /usr/share/ansible/collections: you'll use it in section 13.
- The lab's container registry
For AWX (and your colleagues) to be able to pull the image, it has to be published to a container registry. In a company, this would be an internal registry with authentication and TLS (Harbor, the GitLab registry, Quay, Private Automation Hub…) at registry.aurora-store.example. In the lab, awx1 will host a minimal registry, the official registry:2 image, just as it did with Gitea:
ssh awx1
sudo podman volume create registry-data
sudo podman run -d --name registry --restart=always \
-p 5000:5000 -v registry-data:/var/lib/registry \
docker.io/library/registry:2
curl -s http://registry.aurora-store.example:5000/v2/_catalogSecurity: this registry has neither authentication nor TLS: anyone on the lab network can read and publish images. That's acceptable on a private practice network, never in a company. A real registry requires credentials (in AWX, a Container Registry credential attached to the EE) and certificates.
Since the registry uses HTTP, clients must explicitly declare it as "insecure". There are two different clients:
On your computer (Podman), create /etc/containers/registries.conf.d/50-aurora-store.conf with sudo:
On awx1 (k3s's containerd, which is what pulls the job images), create /etc/rancher/k3s/registries.yaml with sudo:
mirrors:
"registry.aurora-store.example:5000":
endpoint:
- "http://registry.aurora-store.example:5000"And restart k3s so it reads it (the AWX pods recover on their own within a couple of minutes):
Version a copy of this last file in lab/awx/k3s-registries.yaml, alongside the rest of the lab configuration (Lesson 7.2).
- Publishing
aurora-ee
aurora-eeFrom your computer:
podman push registry.aurora-store.example:5000/aurora/aurora-ee:1.0.0
curl -s http://registry.aurora-store.example:5000/v2/aurora/aurora-ee/tags/listCheck that awx1 can pull it with the containerd client that comes with k3s:
If that works, AWX will be able to as well.
- Using
aurora-ee in AWX
aurora-ee in AWXAs alex, Administration → Execution Environments → Add:
| Field | Value | Comment |
|---|---|---|
| Name | aurora-ee 1.0.0 |
With the version in the name, so you know what each template uses |
| Image | registry.aurora-store.example:5000/aurora/aurora-ee:1.0.0 |
|
| Pull | Only pull the image if not present before running | Aurora's tags are immutable: pulling once is enough. With moving tags like latest you'd have to use Always |
| Organization | Aurora Store |
Only Aurora's people see and use it |
| Registry credential | (empty) | The lab registry has no authentication |
Then make it Aurora's environment. AWX chooses a job's EE in this order: the template's, if it has one; otherwise, the project's; otherwise, the organization's; otherwise, the global default. Edit the Aurora Store organization and set Execution Environment = aurora-ee 1.0.0. Aurora's templates have that field empty, so they all inherit it.
Launch Aurora - Configure infrastructure with verbosity 1 (Verbose):
- In Details, Execution Environment shows
aurora-ee 1.0.0. - The first line of the output shows
ansible-playbook [core 2.17.x], the version you wrote down in section 7. - The
PLAY RECAPis once againchanged=0on all four servers: the same code, now in an environment Aurora controls.
Two details:
- Project syncs don't use this EE: in AWX on Kubernetes they run in the installation's own control environment. That's why they still install the collections from
collections/requirements.ymlinto the project cache, which takes precedence over the EE's (Lesson 7.4). Since both come from the same file, the versions match. - Instance groups: in this lab, jobs run as pods in k3s's own default container group. In larger installations, Instance Groups lets you send jobs to other clusters or execution nodes (for example, one per network or per environment).
ansible-navigator: running locally inside the EE
ansible-navigator: running locally inside the EEansible-navigator run is the equivalent of ansible-playbook that runs the playbook inside an EE. It mounts the project directory into the container, runs ansible-playbook there and shows you the result.
First, an explicit run, with every option on the command line and in check mode:
cd ~/aurora-infra
ansible-navigator run site.yml \
--eei registry.aurora-store.example:5000/aurora/aurora-ee:1.0.0 \
--pull-policy missing \
--mode stdout \
--checkrun site.yml: the playbook, as withansible-playbook.--eei(execution environment image): the EE image.--pull-policy missing: pull it only if it isn't available locally.--mode stdout: classic output, identical toansible-playbook's (by default,ansible-navigatoropens its interactive interface).--check: optionsansible-navigatordoesn't recognize are passed through as-is toansible-playbook.
This run will still fail when loading the encrypted files: your ANSIBLE_VAULT_IDENTITY_LIST variable (Lesson 7.3) points to ~/.ansible/vault/aurora-lab.pass on your computer, and neither the variable nor the file exists inside the container. You'll fix that with the configuration in section 13. First, it's worth knowing what reaches the container:
| What | Does it reach the container? |
|---|---|
The project directory (~/aurora-infra) |
Yes, mounted at the same path. That's why ansible.cfg, inventory/, roles/ and galaxy_roles/ work the same |
| Your SSH key | Yes: ansible-navigator forwards your SSH agent (ssh-agent) if you have one running or, if not, mounts your ~/.ssh directory into the container user's |
| Your terminal's environment variables | No, except those specified in the configuration |
Other files on your computer (~/.ansible/vault/...) |
No, unless they're mounted explicitly |
The collections in the project's collections/ |
Yes (they're inside the project), and ansible.cfg puts them first in the path. To test the EE's collections, you have to change the path (section 13) |
- Interactive mode and artifacts
Without --mode stdout, ansible-navigator opens a text interface that lets you explore the run. Once it's configured (section 13), try:
You'll see a table with the plays (Common configuration for..., Configure the Aurora Store database servers...) and their ok, changed, failed… counters. While the run progresses:
| Key / command | Action |
|---|---|
Number (0, 1…) |
Go into the row: from a play to its tasks, from a task to its result on each host (the full JSON the module returned) |
Esc |
Go back to the previous level |
:stdout |
See the classic output |
:help |
Help |
:q |
Quit |
In addition, each run can save an artifact: a JSON file with all the events. With it you can review a run later in the same interface, without running it again, or attach it to an incident:
Careful: artifacts contain the run's full output, including variables and module results. Anything not protected with
no_logmay show up in them. Don't version or share them without reviewing them.
ansible-navigator also replaces other utilities, always inside the EE:
| Subcommand | Equivalent to |
|---|---|
ansible-navigator collections |
ansible-galaxy collection list (browsable, with documentation) |
ansible-navigator doc community.postgresql.postgresql_user |
ansible-doc |
ansible-navigator inventory -i inventory |
ansible-inventory |
ansible-navigator config |
ansible-config dump |
ansible-navigator images |
Explore the local EE images and their contents |
ansible-navigator exec -- <command> |
Run any command inside the EE (for example, exec -- ansible --version) |
ansible-navigator settings --effective |
See ansible-navigator's effective configuration |
ansible-navigator.yml: the configuration in the repository
ansible-navigator.yml: the configuration in the repositoryTo avoid repeating options (and so the whole team uses the same EE), ansible-navigator reads an ansible-navigator.yml configuration file in the project directory. Create it at the root of aurora-infra:
---
# ansible-navigator configuration for aurora-infra (Lesson 7.6).
# Usage: ansible-navigator run site.yml [--check] [--limit ...]
#
# PERSONAL requirement (not in the repository): mount your Vault password directory.
# In ~/.bashrc:
# export ANSIBLE_NAVIGATOR_EXECUTION_ENVIRONMENT_VOLUME_MOUNTS="$HOME/.ansible/vault:/aurora-vault"
ansible-navigator:
execution-environment:
enabled: true
container-engine: podman
image: registry.aurora-store.example:5000/aurora/aurora-ee:1.0.0
pull:
policy: missing
environment-variables:
set:
# Use the EE's collections (not those in the project's collections/).
ANSIBLE_COLLECTIONS_PATH: /usr/share/ansible/collections
# Vault password mounted through the personal variable above.
ANSIBLE_VAULT_IDENTITY_LIST: lab@/aurora-vault/aurora-lab.pass
mode: stdout
playbook-artifact:
enable: true
save-as: "{playbook_dir}/artifacts/{playbook_name}-artifact-{time_stamp}.json"
logging:
level: warning
file: artifacts/ansible-navigator.logExplanation:
execution-environment: enables the use of the EE, with Podman, theaurora-ee:1.0.0image and pulling only when it's missing.environment-variables.set: variables defined inside the container:ANSIBLE_COLLECTIONS_PATHpoints to the image's collections. Environment variables take precedence overcollections_path = collectionsinansible.cfg, soansible-navigatoruses the EE's collections: exactly what you want to test.ANSIBLE_VAULT_IDENTITY_LISTpoints to a path in the container,/aurora-vault/aurora-lab.pass.
- Mounting the Vault password is personal: everyone keeps it in a different place, so it isn't written into the repository. It's specified with the
ANSIBLE_NAVIGATOR_EXECUTION_ENVIRONMENT_VOLUME_MOUNTSenvironment variable (source:destinationformat), which mounts your~/.ansible/vaultat/aurora-vault. mode: stdout: classic output by default; interactive mode is requested with-m interactive.playbook-artifactandlogging: artifacts and log inartifacts/, which is not versioned.
Set up your terminal and .gitignore:
echo 'export ANSIBLE_NAVIGATOR_EXECUTION_ENVIRONMENT_VOLUME_MOUNTS="$HOME/.ansible/vault:/aurora-vault"' >> ~/.bashrc
source ~/.bashrc
echo "/artifacts/" >> .gitignoreAnd run it, now without options:
Both finish with changed=0: your terminal runs Aurora in the same environment as AWX. If a colleague clones the repository tomorrow, all they need is Podman, ansible-navigator, their SSH access, the Vault password and the mount variable; the Ansible version and the collections no longer depend on their computer.
Save the changes:
git add ee/execution-environment.yml ansible-navigator.yml .gitignore lab/awx/k3s-registries.yaml
git commit -m "Execution environment aurora-ee 1.0.0 and ansible-navigator configuration"
git pushansible-playbook keeps working in your terminal as always (with your pipx installation and collections/). Aurora keeps both approaches: ansible-navigator to run things the way AWX does, and ansible-playbook for quick day-to-day work as long as the local versions match.
ansible-playbook vs. ansible-navigator
ansible-playbook vs. ansible-navigator| Aspect | ansible-playbook |
ansible-navigator run |
|---|---|---|
| Where Ansible runs | On your computer, with your installation | Inside an EE (container) |
ansible-core and collection versions |
Those installed on your computer | The image's (the same as in AWX) |
| Requirements | Python and Ansible installed | Podman or Docker and ansible-navigator |
| Output | Text | Text (--mode stdout) or interactive interface |
| Reviewing a past run | No (unless you save the output) | Yes, with artifacts and replay |
| Configuration | ansible.cfg |
ansible.cfg plus ansible-navigator.yml |
| Access to files and variables on your computer | Full | Only the project, SSH and whatever is mounted or passed explicitly |
| Startup speed | Immediate | Somewhat slower (creating the container) |
| When to use it | Fast development, environments without containers | Reproducing exactly what AWX or continuous integration will do; teams with different installations |
ansible-playbook options (--check, --diff, --limit, --tags, -e, -v) are passed to ansible-navigator run in the same way. And if you ever want to use ansible-navigator without an EE (with your local Ansible), there's --ee false.
- Versioning and updating the EE
The EE is one more piece of Aurora's infrastructure and is versioned under the same rules as in Module 6:
- Immutable tags:
aurora-ee:1.0.0always means the same image. A different image is never published again under an existing tag, andlatestis never used in AWX. - When a new version is built: when
collections/requirements.yml, theansible-coreseries, or the Python or system dependencies change, or to pick up security patches for the base image (rebuild periodically even if nothing else changes). - Procedure: change what's needed on a branch → update
options.tags(for example, to1.1.0) → build and inspect → test withansible-navigator run site.yml --check --eei <new image>→ publish → create theaurora-ee 1.1.0EE in AWX → switch it in the organization → updateimageinansible-navigator.yml→ merge intomain. Keeping the previous EE in AWX for a while lets you roll back by changing a single field. - Automation: building and publishing the EE from continuous integration, every time
ee/orcollections/requirements.ymlchanges, is one of the tasks in Lesson 8.3.
Common Mistakes and Tips
- AWX can't pull the image (
ErrImagePullorImagePullBackOffin the job):registries.yamlis missing onawx1(or k3s wasn't restarted), the name doesn't resolve onawx1, or the tag doesn't exist in the registry. Test withsudo k3s crictl pull <image>onawx1. podman pushfails with an HTTPS error: the insecure registry configuration is missing on your computer.- The build fails while installing collections or dependencies: read the output with
-v 3; often it's a Python dependency that needs compiling (look for a-binaryvariant or add the development packages insystem). If it fails while setting uppipfor Python 3.11, add thepython3.11-pip [platform:rpm]package tosystem. - Relative paths in
galaxy:: they're resolved from the directory containingexecution-environment.yml, not from where you run the command. ansible-navigatorcan't find the Vault password: theANSIBLE_NAVIGATOR_EXECUTION_ENVIRONMENT_VOLUME_MOUNTSvariable isn't defined in that terminal (echo $ANSIBLE_NAVIGATOR_EXECUTION_ENVIRONMENT_VOLUME_MOUNTS).- Permission errors when reading mounted files (
Permission deniedwith rootless Podman): the container user doesn't match yours. A common fix is to addcontainer-options: ["--userns=keep-id"]insideexecution-environmentinansible-navigator.yml. Host key verification failedinansible-navigator: the container can't see yourknown_hosts. Check what it sees withansible-navigator exec -- ls -la ~/.sshand review your version'sansible-navigatordocumentation on mounting SSH keys.- Expecting the EE to "contain" the playbooks or roles: it doesn't; they come from the project.
- Tip: record in the commit message (or in a
CHANGELOG) the exact version ofansible-coreand of each collection for each EE tag. When a job behaves differently after an EE change, that's the first thing you'll want to compare.
Exercises
Exercise 1: Explore the EE with ansible-navigator
Using only ansible-navigator, find out: (a) the exact ansible-core version in aurora-ee:1.0.0; (b) the password-related parameters of the community.postgresql.postgresql_user module; (c) the graph of Aurora's inventory as seen from inside the EE.
Exercise 2: Compare environments
Run ansible-navigator run site.yml --check --eei quay.io/ansible/awx-ee:24.6.1 --mode stdout (the default EE for the AWX version from Lesson 7.2) and compare its first line with aurora-ee's. Inside that EE, which collections would the playbook use with the configuration from section 13? Why is this comparison a good test before switching EEs in AWX?
Exercise 3: Version 1.1.0 of the EE
Aurora wants to add the community.crypto collection to the EE for future certificate management (no playbook uses it yet). Describe all the steps, in order, to publish aurora-ee:1.1.0 and use it in AWX and locally, without leaving any duplicated source of truth. Which file do you change to add the collection?
Solutions
Exercise 1.
ansible-navigator exec -- ansible --version
ansible-navigator doc community.postgresql.postgresql_user -m stdout | grep -iA3 password
ansible-navigator inventory -i inventory --graph -m stdout(a) The first line of ansible --version, ansible [core 2.17.x]. (b) Among others, password, encrypted, update_password (with always and on_create) and expires, which you already know from Lesson 5.4. (c) The same graph as in your terminal: @all → @aurora → @loadbalancers (lb1), @webservers (web1, web2), @dbservers (db1). All the commands run inside the EE configured in ansible-navigator.yml.
Exercise 2. The first line shows the ansible-core version of awx-ee:24.6.1, which won't necessarily match Aurora's 2.17 series. With the configuration from section 13, ANSIBLE_COLLECTIONS_PATH=/usr/share/ansible/collections makes it use that image's collections (with its versions, not the ones Aurora pinned). If the playbook finishes the same way (changed=0), that's a sign of compatibility; if differences, errors or deprecation warnings appear, you've discovered them in your terminal, in check mode, before they affect a real job. It's exactly the test you'd run before switching the organization's EE in AWX.
Exercise 3.
- Branch
ee-1.1.0inaurora-infra. - Add
community.cryptowith an exact version (compatible withansible-core2.17) tocollections/requirements.yml: it's the single source of truth, used by your terminal, AWX (the project sync) and the EE (galaxy: ../collections/requirements.yml). ansible-galaxy collection install -r collections/requirements.ymlfor your local environment.- Change
options.tagstoregistry.aurora-store.example:5000/aurora/aurora-ee:1.1.0. ansible-builder build -f ee/execution-environment.yml -c ee/contextand inspect (podman run --rm <image> ansible-galaxy collection list).- Test:
ansible-navigator run site.yml --check --eei registry.aurora-store.example:5000/aurora/aurora-ee:1.1.0. podman pushthe new tag.- In
ansible-navigator.yml, setimage:to 1.1.0; commit, review and merge intomain. - In AWX, create the
aurora-ee 1.1.0EE and set it on theAurora Storeorganization (keepingaurora-ee 1.0.0for a few days so you can roll back). - Launch
Aurora - Check configurationand check the EE used andchanged=0in Details.
Conclusion
You've closed the last gap between your terminal and AWX: the environment Ansible runs in. You know what an execution environment is (a container image with Python, ansible-core, ansible-runner, collections and their dependencies), why it replaces Tower's old virtual environments and which base images exist. You've written ee/execution-environment.yml in ansible-builder's version 3 format (CentOS Stream 9 base image, Python 3.11, ansible-core 2.17, the collections from the project's own collections/requirements.yml, psycopg2-binary, SSH client and Git), you've built, inspected and published aurora-ee:1.0.0 to the lab registry registry.aurora-store.example:5000, and you've set it as the Aurora Store organization's environment in AWX. In your terminal, ansible-navigator runs site.yml inside the same image, in classic or interactive mode, with artifacts for reviewing runs, with the configuration shared in ansible-navigator.yml and only the Vault password mount as a personal setting. With this you close Module 7: Aurora Store has a centralized platform with its code in Git, its secrets protected, team-based permissions, a release workflow with approval, nightly checks and a reproducible execution environment. And along the way you've already worked with containers: the EE is an image, AWX runs on Kubernetes and jobs are pods. In Module 8: Ansible for DevOps you'll start with the lesson Ansible and Docker, where you'll use Ansible to manage containers and images and see how the automation you've built for Aurora Store fits into the world of containers.
Ansible Course: From Beginner to Advanced
Module 1: Introduction to Ansible
- What Is Ansible?
- Installing Ansible
- Setting Up the Practice Lab
- Ansible Architecture
- Basic Ansible Commands
Module 2: Ansible Fundamentals
- Inventory Files
- Inventory Variables: group_vars and host_vars
- Configuring Ansible (ansible.cfg)
- Ad Hoc Commands
- Ansible Modules
- Collections and Fully Qualified Names (FQCN)
Module 3: Playbooks
- Introduction to Playbooks
- Essential YAML for Ansible
- Writing Your First Playbook
- Playbook Structure
- Variables and Facts
- Conditionals and Loops
- Registering Results and Debugging Playbooks
Module 4: Roles
- Introduction to Roles
- Creating Roles
- Role Directory Structure
- Using Roles in Playbooks
- Reusing Tasks: include and import
- Role Dependencies and Argument Validation
Module 5: Advanced Playbook Techniques
- Handlers
- Jinja2 Templates
- Filters and Lookups
- Ansible Vault
- Error Handling
- Tags and Selective Execution
- Rolling Deployments and Delegation
- Optimizing Playbooks
Module 6: Ansible Galaxy
- What Is Ansible Galaxy?
- Using Ansible Galaxy
- Managing Dependencies with requirements.yml
- Creating and Sharing Roles
- Creating Your Own Collections
Module 7: Ansible Tower, AWX and Automation Platform
- Introduction to Ansible Tower and AWX
- Installing AWX
- Using AWX: Job Templates and Jobs
- Managing Projects and Inventories
- Credentials, Permissions (RBAC) and Workflows
- Execution Environments and ansible-navigator
Module 8: Ansible for DevOps
- Ansible and Docker
- Ansible and Kubernetes
- CI/CD with Ansible
- Ansible in Cloud Environments
- Ansible and Terraform
Module 9: Ansible Best Practices
- Code Organization
- Security Best Practices
- Performance Tuning
- Code Quality: ansible-lint and yamllint
- Testing Ansible Code with Molecule
Module 10: Advanced Ansible Topics
- Custom Modules
- Dynamic Inventory
- Ansible Plugins
- The Ansible API and ansible-runner
- Event-Driven Ansible
