AWX in Action
Ansible Orchestration at Scale
Available as: Online course, Kindle, Paperback
What You'll Learn
- Install AWX on Docker or Kubernetes with the AWX Operator, and debug the architecture
- Structure organizations, teams and RBAC that scale past a five-person team
- Build static, dynamic, constructed and smart inventories for your environment
- Create job templates, surveys and workflow templates with approvals and branches
- Build production-ready execution environments with Ansible Builder and Ansible Runner
- Run AWX in HA with execution and hop instances, instance groups and capacity tuning
- Launch AWX jobs from your pipelines using the CLI and API
About This Book
You know Ansible and your playbooks work, but the team is drowning in YAML sprawl, missed schedules and "who ran what when" questions nobody can answer. AWX fixes that if you know how to wield it. This is the practical guide for Ansible users ready to graduate from command-line runs to a production-grade automation platform.
It covers installing AWX on Docker or Kubernetes with the AWX Operator and understanding the architecture — web pods, task pods, PostgreSQL, receptor — well enough to debug it rather than just deploy it. Then organizations, teams and granular RBAC; credential types and external secret stores; static, dynamic, constructed and smart inventories; job templates, surveys and workflow templates with approval nodes and conditional branches; the AWX CLI and API; custom execution environments built with Ansible Builder and Ansible Runner; HA with execution and hop instances, instance groups and container groups; and status views, activity streams, notifications, Prometheus metrics and structured logs. It closes with an end-to-end example that launches jobs from CI.
Table of Contents
-
Why This Book Exists
- Who This Guide Is For
- What You Will Learn
- About the Author
- Join the Community
- Your Feedback Matters
-
How to Get the Most Out of This Book
- What This Book Asks of You
- Conventions
-
AWX Decoded: Architecture, Ecosystem, and the Tradeoffs That Matter
- How Ansible Became AWX
- Ansible Core vs. AWX: When Each One Wins
- What Upstream AWX Doesn't Give You
- Which One Should You Actually Pick?
- Under the Hood: The AWX Architecture
-
From Zero to AWX: A Kubernetes Install That Actually Works
- What You'll Need: Hardware, OS, and Network
- Deploying AWX on K3s With the Operator
-
The AWX Object Model: Organizations, Teams, and RBAC From Day One
- Organizations: Where Everything Lives
- Users and the Three User Types
- Teams: Less Permission Pain
- The Object Model in One Page
-
Inventories Done Right: From Static Hosts to Dynamic Cloud Discovery
- What Inventories Actually Do
- Creating Your First Inventory
- Credentials: How AWX Connects to Hosts
- Constructed Inventories in Depth
- Dynamic Inventories: Letting the Cloud Build Your Inventory
-
Execution Environments Demystified: Build Once, Run Anywhere, Pin Every Version
- Why Execution Environments Exist
- What Happens Between "Launch" and the Pod
- Meet Ansible Builder
- Ansible Runner: The Wrapper Inside Every EE
- Adding and Managing EEs in AWX
- Building Your First Custom EE
- What Builder Actually Does Under the Hood
-
Scale AWX Without Breaking It: Mesh, Hop Nodes, and Capacity Planning
- Control Nodes: The Brain of the Cluster
- Execution Instances: Where Jobs Actually Run
- Hop Nodes: Reaching Across Firewalls and NATs
- Hybrid Nodes (and Why You Won't Use Them on Kubernetes)
- Instance Groups: Splitting Workloads by Intent
- Capacity, Forks, and the Math Behind Scheduling
- Container Groups: Running Jobs as Kubernetes Pods
- Seeing the Whole Mesh: The Topology View
-
From Playbook to Production: Projects, Templates, Jobs, and Workflows in Practice
- Ad-Hoc Commands: One-Liners Without a Playbook
- Projects: Where Your Playbooks Live
- Job Templates: The Reusable Definition
- Launching Your First Job
- Scheduling Jobs (the Right and Wrong Ways)
- Workflow Templates: Chaining Jobs Into a DAG
- Surveys: Turning Templates Into Forms
- Key Objects and Their Relationships in Task Automation
-
What Really Happens When You Hit Launch: The AWX Job Lifecycle
- Step 1: User launches a job
- Step 2: Task Manager picks up the pending job
- Step 3: pg_notify hands off to the dispatcher
- Step 4: TaskWorker prepares the payload
- Step 5: Receptor routes the work
- Step 6: The playbook runs in the EE container
- Step 7: Events flow back
-
Skip the UI: Driving AWX Entirely From the Command Line
- What the AWX CLI Actually Is
- Why Bother With the CLI?
- Installing the CLI on Any Platform
- Three Ways to Authenticate
- OAuth Applications: Per-Integration Credentials
- Generating Tokens From an Application
- Using the CLI in Real Workflows
-
From Git Push to Running PostgreSQL: An End-to-End AWX Workflow
- The Building Blocks: Custom EE, Project, and Job Templates
- Chaining Deploy and Check Into One Workflow
- Monitoring on a Schedule, Alerting on Failure
- Launching the Workflow From the CLI
- Triggering Workflows From CI: A GitHub Actions Example
-
Inside the AWX Settings Menu: Auth Methods, Job Limits, and the Defaults Worth Changing
- Authentication: SSO, LDAP, OIDC, and the Local Fallback
- Jobs: Ad Hoc Module Allowlist, Fact Cache TTL, and Job Limits
- System: Activity Stream, Base URL, and Reverse Proxy Headers
- Auth Behaviors: Basic Auth, Sessions, and OAuth2 Tokens
- Logging: Shipping AWX Events to an Aggregator
- UI: Custom Logo and Login Message
- Troubleshooting: Keep Job Dirs, Profile Requests, Receptor Cleanup
-
Watching AWX: Status Views, Notifications, Logs, and Prometheus Metrics
- Status Views in the AWX UI
- Management Jobs: AWX's Built-In Cleanup Schedules
- Notifications: Templates, Custom Messages, and Inheritance Rules
- Logs: AWX Pods, Receptor Nodes, and Where to Look First
- Metrics: The Prometheus Endpoint and What It Exposes
-
Afterword: Where to Go From Here
- What's Next?
- Your Feedback Matters
Who This Is For
Experienced Ansible users, DevOps engineers, SREs, sysadmins and platform teams who operate Ansible as production infrastructure.
About the Author
Aymen El Amri is a software engineer, author and founder. He runs eralabs, built FAUN.dev, and writes about cloud native systems, AI engineering and developer tooling. More about Aymen.