Getting Started with AWX
This guide walks you through installing AWX and running your first automation job, from zero to executing an Ansible playbook in under 30 minutes.This guide uses the AWX Operator for installation on Kubernetes. For development setups using Docker Compose, see the Docker Compose documentation.
Prerequisites
Before installing AWX, ensure you have:Kubernetes Cluster
A running Kubernetes cluster (1.21+) or OpenShift cluster. Options include:
- Minikube (local development):
minikube start --cpus=4 --memory=8g --addons=ingress - K3s (lightweight Kubernetes)
- EKS/AKS/GKE (managed cloud Kubernetes)
- OpenShift (Red Hat’s Kubernetes distribution)
Cluster Requirements
Minimum resources: 4 CPU cores and 8GB RAM for a basic AWX deployment. Production deployments need significantly more resources depending on workload.
Installation
Step 1: Deploy the AWX Operator
The AWX Operator manages AWX installations on Kubernetes using a Custom Resource Definition (CRD).Step 2: Configure AWX Instance
Create a configuration file for your AWX instance:awx-instance.yaml
Step 3: Create Required Secrets
Create secrets for admin password and PostgreSQL:Step 4: Deploy AWX
Apply the AWX instance configuration:awx-postgres-*- PostgreSQL databaseawx-web-*- Django web server and APIawx-task-*- Task engine for job execution
Step 5: Access AWX UI
Once all pods are running, access the AWX web interface:- NodePort (Minikube)
- LoadBalancer (Cloud)
- Port Forward
- Username:
admin - Password: The password you set in the secret (or retrieve it with
kubectl get secret awx-admin-password -n awx -o jsonpath="{.data.password}" | base64 -d)
First login may take a moment as the UI assets load. You’ll see the AWX dashboard once authentication succeeds.
Your First Automation Job
Now let’s run a simple Ansible playbook through AWX.Step 1: Create an Organization
Step 2: Add a Project
Projects link AWX to your Ansible playbook repositories.Create Project
Click Add and configure:
- Name:
Demo Project - Organization: Select
Demo Organization - Source Control Type:
Git - Source Control URL:
https://github.com/ansible/ansible-tower-samples.git - Update Revision on Launch: Check this box
Step 3: Create an Inventory
Inventories define the hosts your playbooks will run against.Create Inventory
Click Add → Add inventory and configure:
- Name:
Demo Inventory - Organization: Select
Demo Organization
Step 4: Create a Credential
For localhost connections, we’ll create a basic machine credential.Step 5: Create a Job Template
Job templates tie everything together: project, inventory, and credentials.Step 6: Launch Your First Job!
Watch Real-time Output
You’ll be redirected to the job details page showing real-time output as the playbook executes. You should see:
Congratulations! You’ve successfully installed AWX and executed your first automation job. 🎉
Using the AWX CLI
The AWX CLI (awxkit) provides command-line access to AWX functionality.
Install the CLI
Configure CLI Authentication
Common CLI Operations
Next Steps
Now that you have AWX running, explore these advanced features:Configure RBAC
Set up teams, users, and granular permissions for your organization
Dynamic Inventories
Automatically populate inventories from AWS, Azure, GCP, or other sources
Workflow Jobs
Chain multiple job templates together with conditional logic
Job Scheduling
Schedule jobs to run automatically at specific times or intervals
Notifications
Configure Slack, email, or webhook notifications for job results
Execution Environments
Use custom container images with specific Ansible versions and dependencies
Troubleshooting
Pods not starting
Pods not starting
Check pod logs for errors:Common issues:
- Insufficient cluster resources (CPU/memory)
- PostgreSQL connection failures (check secrets)
- Image pull errors (check network connectivity)
Can't access AWX UI
Can't access AWX UI
Verify the service is running:Check if pods are ready:Review web pod logs:
Job fails to run
Job fails to run
Common causes:
- Missing or invalid credentials
- Network connectivity issues from AWX to target hosts
- Inventory configuration errors
- Playbook syntax errors
awx/main/models/unified_jobs.py), job status can be:new- Job created but not startedpending- Waiting for task managerwaiting- Assigned to node, about to runrunning- Currently executingsuccessful- Completed successfullyfailed- Completed with failureserror- Unable to runcanceled- Canceled before completion
Database migrations pending indefinitely
Database migrations pending indefinitely
If you see repeating “Waiting for postgres to be ready” messages:
Additional Resources
AWX Documentation
Official AWX documentation with comprehensive guides
AWX Operator Docs
AWX Operator documentation and configuration options
Ansible Forum
Community support and discussions
Architecture Guide
Deep dive into AWX architecture and components