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:1
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)
2
kubectl CLI
Install
kubectl to interact with your cluster:3
Kustomize
Install
kustomize (3.5.1+) for deploying AWX: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
1
Navigate to Organizations
In the AWX UI, click Organizations in the left navigation menu.
2
Create Organization
Click the Add button and fill in:
- Name:
Demo Organization - Description:
My first AWX organization
Step 2: Add a Project
Projects link AWX to your Ansible playbook repositories.1
Navigate to Projects
Click Projects in the left navigation.
2
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
3
Wait for Sync
AWX will automatically sync the playbooks from Git. Watch the Last Job Status indicator turn green.
Step 3: Create an Inventory
Inventories define the hosts your playbooks will run against.1
Navigate to Inventories
Click Inventories in the left navigation.
2
Create Inventory
Click Add → Add inventory and configure:
- Name:
Demo Inventory - Organization: Select
Demo Organization
3
Add a Host
In the inventory details, click the Hosts tab, then Add:Click Save.
- Name:
localhost - Variables (in YAML):
Step 4: Create a Credential
For localhost connections, we’ll create a basic machine credential.1
Navigate to Credentials
Click Credentials in the left navigation.
2
Create Credential
Click Add and configure:
- Name:
Demo Credential - Organization: Select
Demo Organization - Credential Type:
Machine
Step 5: Create a Job Template
Job templates tie everything together: project, inventory, and credentials.1
Navigate to Templates
Click Templates in the left navigation.
2
Create Job Template
Click Add → Add job template and configure:
- Name:
Demo Job Template - Job Type:
Run - Inventory: Select
Demo Inventory - Project: Select
Demo Project - Playbook: Select
hello_world.yml - Credentials: Select
Demo Credential - Verbosity:
1 (Verbose)
Step 6: Launch Your First Job!
1
Launch the Job
From the job template details page, click the Launch button (rocket icon).
2
Watch Real-time Output
You’ll be redirected to the job details page showing real-time output as the playbook executes. You should see:
3
Explore Job Details
After completion, explore the job details:
- Output tab: Full Ansible playbook output
- Details tab: Job metadata and statistics
- Host Events tab: Per-host task results
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