At the end of Module 6, Aurora Store had complete, well-organized automation: its own roles, dependencies pinned in requirements.yml, a role shared through Git and a collection for other teams. But all of it still depends on your laptop: you have the SSH key, you have the Vault password, you run ansible-playbook site.yml, and only your terminal knows what happened. This lesson introduces the platforms that solve that problem: AWX, the open source project, and Red Hat Ansible Automation Platform (AAP), the commercial product whose central component was called Ansible Tower for years and is now called automation controller. You'll see what problems they solve, how they relate to each other, how they're built on the inside, and what the concepts are (projects, inventories, credentials, templates, jobs…) that you'll be working with throughout the module. This is a conceptual lesson: you won't install anything yet; that starts in Lesson 7.2.
Contents
- The problem: automation lives on a laptop
- What an automation platform brings
- History: from Ansible Tower to automation controller, and AWX
- AWX vs. Ansible Automation Platform
- AWX and automation controller architecture
- The key concepts and how they relate
- Inside a job: what happens when you click "Launch"
- The REST API and the
awxtool - The module plan for Aurora Store
- The problem: automation lives on a laptop
Review how a change is applied at Aurora Store today:
It works, and for a single administrator it's enough. But Aurora's team has grown: Marc (Operations) also applies changes, Laura (Development) wants to deploy new versions of the website without asking you every time, and management wants to know who changed the nginx configuration last Tuesday. When you try to answer, the limits of the "everyone from their own terminal" model show up:
| Problem | How it shows up at Aurora |
|---|---|
| Scattered credentials | Running site.yml requires the ~/.ssh/aurora_ed25519 key and the ~/.ansible/vault/aurora-lab.pass file. Everyone who runs it has a copy; if someone leaves the company, both secrets have to be rotated. |
| No control over who can do what | Whoever has the SSH key can run any playbook against any server. There's no way to say "Laura can only deploy the website, and only by changing the version". |
| No auditing | The output of each run is lost when the terminal is closed. There's no central record of who launched what, with which variables, against which servers or with what result. |
| No reliable scheduling | Checking every night for configuration drift would mean leaving a cron job on someone's laptop (which gets shut down, goes to sleep or changes hands). |
| Different execution environments | Your laptop has ansible-core 2.17 and certain collection versions; Marc's may have others. "It works on my machine" is back, now at the tooling level. |
| Hard collaboration | For another team (or an external system, such as continuous integration) to launch an automation, it needs Ansible installed, the repository cloned and the secrets. |
None of these problems is in the playbooks: they're in how the playbooks are run. That's where an automation platform comes in.
- What an automation platform brings
AWX and automation controller turn running Ansible into a centralized service. The playbooks stay the same (site.yml, the roles, the inventory…), but they're no longer launched from laptops; instead they're launched from a server that:
- Fetches the code from Git (the
aurora-infrarepository) and installs itsrequirements.ymldependencies automatically. - Stores credentials encrypted (SSH key, Vault password, tokens) and injects them into each run without showing them to whoever launches it.
- Controls access with users, teams and roles: who can view, launch, modify or approve each thing.
- Records every run (a job): who launched it, when, with what parameters, the full task-by-task output and the result for each server.
- Schedules periodic runs (every night, every Monday…) without depending on anyone's personal computer.
- Chains automations into workflows with conditions and human approvals.
- Offers a web interface and a REST API, so people with no Ansible knowledge can launch a task by filling in a form, and other systems can integrate with it.
- Runs in reproducible execution environments (container images with pinned
ansible-core, collections and Python libraries), the same for everyone.
flowchart LR
subgraph Antes["Before: everyone from their own terminal"]
A1[Alex's laptop<br/>key + Vault] --> S1[(Servers)]
A2[Marc's laptop<br/>key + Vault] --> S1
A3[Laura asks<br/>Alex or Marc] -.-> A1
end
subgraph Despues["After: centralized platform"]
U1[Alex] --> P[AWX<br/>credentials, permissions,<br/>history, scheduling]
U2[Marc] --> P
U3[Laura] --> P
G[(Git:<br/>aurora-infra)] --> P
P --> S2[(Servers)]
end
What matters is what does not change: the platform runs ansible-playbook (or its equivalent) with your playbooks. Everything you've learned in the previous modules still applies; AWX only changes where, how and who runs things.
- History: from Ansible Tower to automation controller, and AWX
The names of these tools have changed several times, and the old and new ones still coexist in documentation, forums and job postings. Here's the timeline in brief:
| Period | Milestone |
|---|---|
| 2013-2015 | AnsibleWorks (later Ansible, Inc.) releases Ansible Tower, a commercial, closed source web interface for Ansible. |
| 2015 | Red Hat acquires Ansible, Inc. |
| 2017 | Red Hat releases the Tower code as an open source project: AWX is born, the upstream project (the one the product comes from). |
| 2019 | Red Hat Ansible Automation Platform (AAP) appears, a product that bundles Tower with other components (Automation Hub, analytics…). |
| 2021 (AAP 2.0/2.1) | Tower is renamed automation controller. Execution environments (containers) arrive to replace Python virtual environments, along with automation mesh for distributing execution. |
| 2024 (AAP 2.5) | AAP unifies its components (automation controller, automation hub, Event-Driven Ansible) behind a common gateway (platform gateway): a single web interface, a single authentication and a unified API. |
In practice:
- "Ansible Tower" is the historical name. If you read "Tower" in an article, today it means automation controller.
- "automation controller" is the AAP component that runs the playbooks: Tower's direct successor.
- "AWX" is the open source project automation controller derives from. Features appear in AWX first and reach the product once they've stabilized.
Note: the course uses the English interface terminology (Projects, Inventories, Templates…), since that's what you'll see on screen and in the documentation. The first time each term appears, its meaning is explained.
- AWX vs. Ansible Automation Platform
AWX and automation controller share most of their code and concepts: what you learn in this module with AWX carries over almost entirely to AAP. The differences lie in support, life cycle and what's included around it:
| Aspect | AWX | Red Hat Ansible Automation Platform |
|---|---|---|
| License and cost | Open source (Apache 2.0), free | Paid subscription based on the number of managed nodes |
| Support | Community (Ansible forum, GitHub); no guarantees | Red Hat support with service level agreements |
| Release cycle | Frequent releases, no long-term support versions; upgrades may bring breaking changes | Stable versions with a published life cycle, security patches and tested upgrade paths |
| Upgrades | Forward only, with a prior backup; no compatibility guarantee when skipping versions | Documented, supported upgrade paths |
| Installation | AWX Operator on Kubernetes (the only method supported by the project) | Containerized installer on RHEL, operator on OpenShift (and other variants depending on the version) |
| Certified content | Not included (uses Galaxy and your own collections) | Access to certified and validated collections in Automation Hub, supported execution environments |
| Additional components | The controller only (other community projects separately: Galaxy NG, EDA server…) | Integrated platform: controller, private automation hub, Event-Driven Ansible, platform gateway, analytics, AI assistant (depending on the subscription) |
| Recommended use | Labs, learning, small teams that accept managing the risk, trying out new features | Production in companies that need support, certifications and stability |
Note on the state of the AWX project: in 2024 the AWX team announced an internal reorganization of the project, with less frequent releases while its architecture is restructured. In Lesson 7.2 you'll pin a specific version as an example, but before installing, always check the project's releases page (
github.com/ansible/awxandgithub.com/ansible/awx-operator) and its official forum to find out which version is recommended at that point.
Aurora's decision: in the course lab you'll use AWX, which is free and gets installed on your own computer. If Aurora Store grows to the point where its business depends on automation (and it needs guaranteed support), the natural migration would be to AAP: the projects, inventories, credentials and templates you design now carry over with the same concepts.
- AWX and automation controller architecture
From the outside, AWX is "a website that runs playbooks". On the inside it has several pieces, and knowing them will help you install it (7.2) and troubleshoot problems.
flowchart TB
U[Browser / awx CLI / REST API] -->|HTTPS| WEB
subgraph AWX["AWX (on Kubernetes)"]
WEB["web<br/>interface + REST API"]
TASK["task<br/>scheduler, job manager,<br/>project syncs"]
RCPT["receptor<br/>execution network (mesh)"]
DB[("PostgreSQL<br/>configuration, encrypted credentials,<br/>job history")]
REDIS[("Redis<br/>internal messaging")]
WEB <--> DB
TASK <--> DB
WEB <--> REDIS
TASK <--> REDIS
TASK --> RCPT
end
RCPT --> EE1["Execution environment<br/>(container with ansible-core<br/>+ collections)"]
EE1 -->|SSH| H[(lb1, web1, web2, db1)]
TASK -->|git clone| GIT[(Git server)]
| Component | Role |
|---|---|
| web | Serves the web interface and the REST API. Everything you do in the interface is actually an API call. |
| task | The execution "brain": it decides which job runs and where, launches project and inventory syncs, manages schedules and collects the events of each job. |
| PostgreSQL database | Stores all the configuration (organizations, projects, templates…), the encrypted credentials and the job history with its output. It's the most valuable piece: without it (and without the key that encrypts the credentials) there's no AWX. |
| Redis | Internal messaging between processes (for example, so a job's output appears in real time in the browser). |
| Receptor / automation mesh | Overlay network that connects the controller to the nodes that run the jobs, even in other networks or data centers (execution nodes and hop nodes). In a small installation it's transparent. |
| Execution environments (Execution Environments, EE) | Container images with ansible-core, ansible-runner, collections and Python libraries. Each job runs inside a container created from an EE (on Kubernetes, a pod). You'll study them in Lesson 7.6. |
| Instance groups (Instance Groups) | Group the nodes or the Kubernetes cluster where jobs run. They make it possible, for example, for production jobs to run on a specific network. |
In AWX installed with its operator (what you'll do in 7.2), each piece is a container inside Kubernetes pods, and jobs run as ephemeral pods that are created at launch and destroyed when they finish. In AAP 2.5 and later, there's also a platform gateway in front of the controller that centralizes authentication and the interface for all the platform's components.
A very important practical consequence: jobs no longer run on your laptop. The EE container is the one that opens the SSH connections to lb1, web1, web2 and db1, and the one that clones the repository. Everything your playbooks take for granted about "the control machine" (paths like ~/.ssh/aurora_ed25519 or ~/.ansible/vault/aurora-lab.pass, the Git repository in ~/aurora-git/, the locally installed collections) doesn't exist inside that container. Solving this is a good part of the work in Lessons 7.3 and 7.4.
- The key concepts and how they relate
AWX organizes automation into objects. This table introduces them alongside their equivalent in what you already know:
| Object (interface) | What it is | Equivalent in your terminal | Lesson |
|---|---|---|---|
| Organization | Top-level container: groups users, teams, projects, inventories, credentials and templates | — (everything was "yours") | 7.3, 7.5 |
| User / Team | People and groups of people who are granted permissions | Whoever has access to your laptop | 7.5 |
| Project | A Git repository with playbooks, synced by AWX | ~/aurora-infra cloned |
7.3, 7.4 |
| Inventory | Hosts, groups and variables; can be imported from the project or from the cloud | inventory/ |
7.3, 7.4 |
| Credential | A secret stored encrypted: SSH key, Vault password, Git or cloud token… | ~/.ssh/aurora_ed25519, aurora-lab.pass |
7.3, 7.5 |
| Job Template | Reusable definition of "which playbook, against which inventory, with which credentials and options" | An ansible-playbook command line with all its options |
7.3 |
| Job | A specific run of a template, with its output and result | A run in the terminal | 7.3 |
| Workflow Template | Chains templates, syncs and approvals with conditions | A script that launches several playbooks | 7.5 |
| Schedule | Periodic run of a template, project or inventory | cron |
7.3 |
| Survey | Form that asks for variables when a template is launched | -e aurora_app_version=... |
7.3, 7.5 |
| Execution Environment | Container image in which jobs run | Your Ansible installation (pipx) and the collections | 7.6 |
| Instance Group | Where jobs run | Your laptop | 7.2, 7.6 |
| Notification | Email, chat or webhook alert when a job starts, finishes or fails | — | 7.3 |
And this is how they relate:
flowchart TB
ORG[Organization<br/>Aurora Store]
ORG --> TEAM[Teams and Users]
ORG --> PROJ[Project<br/>aurora-infra repo]
ORG --> INV[Inventory<br/>hosts and groups]
ORG --> CRED[Credentials<br/>SSH, Vault, Git]
ORG --> EE[Execution Environment]
PROJ -->|provides the playbook| JT[Job Template]
INV -->|against which hosts| JT
CRED -->|with which secrets| JT
EE -->|where it runs| JT
JT -->|each launch creates| JOB[Job<br/>output + result]
JT --> WF[Workflow Template]
SCH[Schedule] -->|launches periodically| JT
TEAM -.->|RBAC permissions<br/>on each object| JT
PROJ -.->|can be a source for| INV
The central piece is the job template: it brings together a playbook from a project, an inventory, some credentials and an execution environment, and adds options (host limit, tags, check mode, variables…). Every time someone launches it, a job is created. Permissions are assigned object by object: you can allow a team to launch a template without letting it view or use the credential it contains.
- Inside a job: what happens when you click "Launch"
To consolidate the concepts, follow the path of a job that runs site.yml:
sequenceDiagram
actor M as Marc
participant W as AWX web/API
participant T as AWX task
participant G as Git server
participant E as Container (EE)
participant H as lb1, web1, web2, db1
M->>W: Launch the "Configure infrastructure" template
W->>W: Does Marc have the Execute permission?
W->>T: Create job
T->>G: Update project (if applicable) + requirements
T->>E: Create the EE container with project, inventory<br/>and injected credentials
E->>H: ansible-playbook site.yml (SSH)
E-->>T: Events for each task in real time
T-->>W: Store events and result in PostgreSQL
W-->>M: Live output and final status
- AWX checks that the user has permission to launch that template.
- If the project is configured to do so, it syncs the repository from Git and installs the roles and collections from the requirements files.
- It prepares a private directory with the project, the inventory (exported from its database), the variables and the decrypted credentials.
- It launches an execution environment container and, inside it,
ansible-runnerruns the playbook. - Each event (task start, per-host result,
PLAY RECAP) goes back to AWX, which stores it and displays it live. - When it finishes, the container is destroyed (and the decrypted credentials with it) and the job stays in the history.
- The REST API and the
awx tool
awx toolEverything in AWX is accessible through a REST API at /api/v2/ (in AAP 2.5 and later, through the platform gateway, with the controller's own paths). The web interface uses that same API, so anything you do with the mouse can be automated. For example, launching a template is a POST to /api/v2/job_templates/<id>/launch/. You can explore the API from the browser: open /api/v2/ at the AWX address and you'll see a browsable interface.
So you don't have to write HTTP requests by hand, there are:
| Tool | What it is | Typical use |
|---|---|---|
awx (awxkit package) |
Command-line client for the API | Launching templates from scripts or from continuous integration, querying jobs |
awx.awx collection (or ansible.controller in AAP) |
Ansible modules for managing AWX | "Configuration as code": creating organizations, projects and templates with playbooks |
curl or another HTTP client |
Direct API calls with a token | One-off integrations, webhooks |
You'll see an example of awx and the API in Lesson 7.3. Managing AWX entirely as code with awx.awx is beyond the scope of this module, but it's the recommended practice once the AWX configuration grows: that way, the templates and permissions themselves are also versioned in Git.
- The module plan for Aurora Store
Throughout the module, Aurora's team will centralize execution in AWX:
| Lesson | What you'll do |
|---|---|
| 7.2 | Create a new awx1 machine in the lab with lightweight Kubernetes (k3s), install AWX with its operator and set up the lab Git server (git.aurora-store.example) |
| 7.3 | Publish aurora-infra on the Git server, adapt it to run outside your laptop, create the Aurora Store organization and the first template that runs site.yml; launch, read, relaunch and schedule jobs |
| 7.4 | Understand projects (syncing, branches, requirements.yml) and inventories (from the project, constructed, dynamic) in depth |
| 7.5 | Credentials, team permissions (Operations, Development, auditing) and a workflow with an approval step for deploying the website |
| 7.6 | Build the aurora-ee execution environment with ansible-builder, publish it to a registry and use it in AWX and locally with ansible-navigator |
Common Mistakes and Tips
- Thinking AWX replaces the playbooks: AWX doesn't replace anything you've written; it runs it. A playbook that fails in your terminal will also fail in AWX.
- Mixing up the names: "Tower", "automation controller", "AAP" and "AWX" aren't four different products. Tower is the old name for the controller; the controller is one piece of AAP; AWX is its open source upstream version.
- Using AWX in production without a backup and upgrade plan: AWX has no long-term support versions. If you adopt it in production, you need tested backups (database and encryption key) and an upgrade procedure.
- Assuming the job's environment is your laptop: paths with
~, local files and repositories on your disk don't exist inside the job's container. This is the most common mistake when migrating to AWX. - Tip: think of each job template as a complete, documented command line. If you couldn't write the equivalent
ansible-playbookcommand, you don't yet know what the template should do.
Exercises
Exercise 1: From command to template
Marc usually runs this command:
ansible-playbook webservers.yml --limit web1 --tags deploy -e aurora_app_version=1.2.0 --check --diffSay which AWX object or field each part of the command corresponds to (and which implicit pieces, such as the SSH key or the Vault password, AWX would also need to know about).
Exercise 2: AWX or AAP?
For each situation, say whether you'd choose AWX or AAP and why:
- An internal training lab that's reinstalled every quarter.
- A bank that automates security patches on 3,000 servers and needs 24x7 support.
- Aurora Store today: a team of five people, four servers and no budget for licenses.
Exercise 3: Put the path in order
Put these steps of an AWX job in order: (a) the EE container is destroyed; (b) AWX checks the user's permissions; (c) the project is synced from Git; (d) ansible-runner runs the playbook; (e) the events are stored in PostgreSQL; (f) the container is created with the injected credentials.
Solutions
Exercise 1.
| Part of the command | In AWX |
|---|---|
ansible-playbook webservers.yml |
Playbook field of the Job Template, chosen from those in the aurora-infra Project |
(inventory from ansible.cfg) |
Inventory field of the template |
--limit web1 |
Limit field (optionally prompted on launch) |
--tags deploy |
Job Tags field |
-e aurora_app_version=1.2.0 |
Variables field (extra vars) or, better, a Survey that asks for the version |
--check |
Job Type = Check |
--diff |
Show Changes option |
SSH key and vagrant user |
Credential of type Machine |
Vault password (aurora-lab.pass) |
Credential of type Vault with the lab identifier |
| Ansible version and collections | Execution Environment |
Exercise 2. (1) AWX: it's free, the lack of support isn't a problem and it's reinstalled frequently. (2) AAP: it needs guaranteed support, a stable life cycle, security patches and probably certified content. (3) AWX, knowingly accepting its risks (backups and upgrades are the team's own responsibility), with the door open to migrating to AAP if the business comes to depend on the platform.
Exercise 3. b → c → f → d → e → a. (In reality, the events are stored as the playbook runs, so d and e overlap; destroying the container is always the last step.)
Conclusion
In this lesson you've seen why Aurora Store's automation can't keep living on a laptop: scattered credentials, no permission control, no auditing, fragile scheduling and different execution environments on each computer. You've met the platforms that solve those problems: AWX, the open source project, and Red Hat Ansible Automation Platform, whose automation controller is the successor to Ansible Tower; and you've compared their support, release cycle, certified content and cost. You know how they're built on the inside (web and API, task, PostgreSQL, Redis, receptor and containerized execution environments), which objects they handle (organizations, teams, projects, inventories, credentials, job templates, jobs, workflows, schedules and execution environments), how those objects relate and what happens step by step when a job is launched. Now it's time to put it into practice: in the next lesson, Installing AWX, you'll add the awx1 machine to the lab, set up lightweight Kubernetes on it, install AWX with its operator and prepare the Git server from which AWX will fetch Aurora's code.
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
