Skip to main content

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).
Check the AWX Operator releases page for the latest version.
Verify the operator is running:

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:
In production, use strong, randomly generated passwords and store them securely. Never commit passwords to version control.

Step 4: Deploy AWX

Apply the AWX instance configuration:
Watch the deployment progress:
The deployment typically takes 5-10 minutes. You’ll see pods starting:
  • awx-postgres-* - PostgreSQL database
  • awx-web-* - Django web server and API
  • awx-task-* - Task engine for job execution

Step 5: Access AWX UI

Once all pods are running, access the AWX web interface:
Login with:
  • 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
Click Save.

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
Click Save.
3

Wait for Sync

AWX will automatically sync the playbooks from Git. Watch the Last Job Status indicator turn green.
The ansible-tower-samples repository contains demo playbooks perfect for testing AWX functionality.

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
Click Save.
3

Add a Host

In the inventory details, click the Hosts tab, then Add:
  • Name: localhost
  • Variables (in YAML):
Click Save.

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
For localhost, leave all authentication fields empty.Click Save.

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)
Click Save.

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

Use awx --help to explore all available commands and options. The CLI mirrors the REST API structure.

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

Check pod logs for errors:
Common issues:
  • Insufficient cluster resources (CPU/memory)
  • PostgreSQL connection failures (check secrets)
  • Image pull errors (check network connectivity)
Verify the service is running:
Check if pods are ready:
Review web pod logs:
Common causes:
  • Missing or invalid credentials
  • Network connectivity issues from AWX to target hosts
  • Inventory configuration errors
  • Playbook syntax errors
Check job output in the AWX UI for specific error messages. From the source code (awx/main/models/unified_jobs.py), job status can be:
  • new - Job created but not started
  • pending - Waiting for task manager
  • waiting - Assigned to node, about to run
  • running - Currently executing
  • successful - Completed successfully
  • failed - Completed with failures
  • error - Unable to run
  • canceled - Canceled before completion
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