Introduction to AWX
AWX is the open source upstream project for Red Hat Ansible Automation Platform, providing a web-based interface, REST API, and task engine for Ansible. It helps teams manage automation at scale with role-based access control, scheduling, and workflow orchestration.
0. AWX Structure Overview
graph TB
A[AWX Instance] --> B[Organization]
A --> C[Administration]
B --> D[Teams]
B --> E[Users]
B --> F[Inventories]
B --> G[Projects]
G --> H[Job Templates]
G --> I[Workflow Templates]
H --> J[Jobs]
I --> K[Workflow Jobs]
C --> L[Notification Templates]
C --> M[Credentials]
C --> N[Settings]1. Creating an Organization
Organizations are the highest level of isolation in AWX. They contain users, teams, inventories, and projects.
Steps:
- Navigate to Organizations → Add
- Enter Name and Description
- Configure optional settings:
- Maximum Hosts
- Execution Environment defaults
- Galaxy credentials
Best Practice: Create separate organizations for different departments (Dev, Ops, Security) or environments (Production, Staging).
2. Creating Teams
Teams allow grouping users within an organization with specific permissions.
Steps:
- Select your Organization
- Go to Teams → Add
- Define team name and assign members
- Set permissions for Inventories, Projects, or Templates
graph LR
A[Organization] --> B[Team: DevOps]
A --> C[Team: Network]
A --> D[Team: Security]
B --> E[User: Alice]
B --> F[User: Bob]
C --> G[User: Charlie]
D --> H[User: Dana]3. Creating Users
Users can belong to multiple organizations and teams.
Steps:
- Navigate to Users → Add
- Fill in user details
- Assign to Organizations and Teams
- Set System Administrator flag if needed
- Configure user type (Normal, System Auditor, System Administrator)
Note: Consider integrating with LDAP/AD for enterprise-scale deployments.
4. Creating Inventories
Inventories define the hosts and groups that Ansible manages.
Types:
- Static Inventories: Manually defined hosts
- Smart Inventories: Dynamic based on filters
- Constructed Inventories: Generated from other inventories
Steps:
- Go to Inventories → Add Inventory
- Choose type and provide details
- Add hosts manually or use source:
- Cloud providers (AWS, Azure, GCP)
- SCM (Git)
- Custom script
Example Smart Inventory Filter: ansible_facts.ansible_os_family: RedHat
5. Creating Projects
Projects are collections of Ansible playbooks, usually sourced from version control.
Supported Sources:
- Git (GitHub, GitLab, Bitbucket)
- Subversion
- Mercurial
- Local directory (for manual sync)
Steps:
- Projects → Add Project
- Configure SCM details
- Set update options (manual/on launch)
- Choose Execution Environment
Pro Tip: Use project revision control to track playbook changes over time.
6. Creating Job Templates
Job Templates link projects, inventories, and credentials to create executable jobs.
graph TD
A[Project<br/>Playbooks] --> D[Job Template]
B[Inventory<br/>Hosts/Groups] --> D
C[Credential<br/>SSH/Cloud] --> D
E[Execution Environment] --> D
F[Extra Variables] --> D
D --> G[Job Execution]Steps:
- Templates → Add Job Template
- Configure:
- Name and Description
- Inventory
- Project and Playbook
- Credentials (machine, cloud, vault)
- Execution Environment
- Forks, timeout, verbosity
- Set prompt-on-launch options for flexibility
7. Creating Workflow Templates
Workflow Templates chain multiple job templates and other workflows.
Node Types:
- Job Template
- Project Sync
- Inventory Sync
- Workflow Approval
- Workflow Template (nested)
graph LR
A[Workflow Start] --> B[Provision Servers]
B --> C{Approval?}
C -- Yes --> D[Configure Applications]
C -- No --> E[Send Notification]
D --> F[Run Tests]
F --> G[Deploy to Production]
style B fill:#e1f5fe
style C fill:#fff3e0
style D fill:#e8f5e8Steps:
- Templates → Add Workflow Template
- Design workflow visually using the Workflow Visualizer
- Configure convergence (always/all/successful)
- Set extra variables and survey
8. Executing a Job from a Job Template
Methods:
- Web UI: Click “Launch” on Job Template
- CLI: Use
awxortower-cli - API: POST request to
/api/v2/job_templates/N/launch/
Monitoring:
- Real-time output in web UI
- Job status updates
- Notifications on completion
- Detailed job reports and metrics
9. Executing a Job from a Workflow Template
Key Differences:
- Parallel or sequential execution
- Conditional paths
- Approval steps
- Comprehensive audit trail
Execution Flow:
- Launch triggers first node
- Each node runs based on convergence rules
- Progress shown in Workflow Visualizer
- Final status aggregated
10. Scheduling Jobs
Schedule recurring or future executions.
Configuration Options:
- Frequency: Minute, Hourly, Daily, Weekly, Monthly, Custom cron
- Start/End Dates: Set expiration for temporary schedules
- Time Zones: Local or UTC
- Extra Variables: Override per schedule
Use Cases:
- Daily configuration compliance checks
- Weekly reporting
- Monthly maintenance windows
- On-demand scheduled deployments
11. Configuring Notification Templates
Notifications alert users and systems about job status.
Supported Integrations:
- Slack
- Microsoft Teams
- Webhooks
- IRC
- PagerDuty
- Grafana
Steps:
- Administration → Notification Templates → Add
- Choose type and configure
- Test using “Test” button
- Customize messages with templates
12. Assigning Notifications to Templates
Notifications can be assigned at multiple levels:
Assignment Hierarchy:
- Organization-level (all jobs)
- Template-level (specific jobs/workflows)
- Job-level (override for specific run)
Configuration:
- Edit Template → Notifications tab
- Add notification templates
- Choose triggers:
- Success
- Error
- Started
- Approval needed/approved/denied
13. Leveraging the AWX API
The REST API enables full automation of AWX itself.
Common Use Cases:
- CI/CD pipeline integration
- Bulk operations
- Custom dashboards
- External system integration
API Examples:
# Launch job via API
curl -X POST https://awx.example.com/api/v2/job_templates/7/launch/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
# Create inventory via API
curl -X POST https://awx.example.com/api/v2/inventories/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Production", "organization": 1}'Python Example:
import requests
from awx import Awx
awx = Awx(
username='admin',
password='password',
base_url='https://awx.example.com'
)
# Create and launch job
job = awx.job_templates.launch(
id=7,
extra_vars={'version': '2.1.0'}
)Best Practices & Tips
- RBAC Strategy: Follow principle of least privilege
- Inventory Management: Use dynamic inventories for cloud environments
- Version Control: Store all playbooks in Git
- Credential Security: Use vault for sensitive data
- Monitoring: Configure comprehensive notifications
- Backup: Regularly backup AWX database
- Scaling: Use isolated execution nodes for large environments
Conclusion
AWX provides enterprise-grade automation capabilities while remaining open source. By following this structured approach—from organizations and teams to job templates and workflows—teams can build scalable, maintainable automation pipelines. The API-first design ensures AWX can integrate into any DevOps toolchain, making it a versatile choice for infrastructure automation.
Start small with a single job template, then expand to workflows and scheduled jobs as your automation maturity grows.