Feedback

Chat Icon

AWX in Action

Ansible Orchestration at Scale

Execution Environments Demystified: Build Once, Run Anywhere, Pin Every Version
36%

What Happens Between "Launch" and the Pod

Every job in AWX follows the same path. A user clicks Launch, a schedule fires, or a webhook arrives. AWX picks the Execution Environment defined on the job template, pulls the image from a container registry like Quay, GHCR, or ECR (or skips the pull if it's already cached on the cluster), and starts a pod from that image.

The pod is ephemeral. It exists for one job and gets destroyed when the job finishes. Inside the pod, AWX mounts the playbook (usually pulled from the project's Git repo), the inventory snapshot, and the decrypted credentials. Then it runs ansible-playbook from within the pod.

From there, two things can happen depending on what the playbook does.

  • For connection: ssh tasks (the default), the pod opens SSH connections from inside the container out to the managed nodes and runs Python on them.
  • For connection: local tasks or modules that hit cloud APIs (amazon.aws.ec2_instance, kubernetes.core.k8s, and similar), the work stays inside the pod and the API calls go out over HTTPS. A real playbook usually does both: provision an instance via API, then SSH in to configure it.

While the playbook runs, stdout and structured events stream back to AWX. They land in Postgres as the Job's permanent record (output, status, host results, timing). The web UI tails this in real time so you see the playbook as it runs.

When ansible-playbook exits, the pod is destroyed. Nothing persists on the AWX controller itself: not the playbook copy, not the credentials, not the Python libraries the EE happened to use. The next job gets a fresh pod from the same (or different) EE image. This is the entire point of EEs: each job is isolated, reproducible, and cleans up after itself.

AWX Execution Environment lifecycle

AWX Execution Environment lifecycle

To see the available execution environments in your AWX instance, navigate to the Execution Environments menu. You'll find the default execution environments, their names, the image they use, and the organization to which they are available.

AWX seeds three execution environments by default. All three point at the same quay.io/ansible/awx-ee

AWX in Action

Ansible Orchestration at Scale

Enroll now to unlock all content and receive all future updates for free.