Stage 4 · Provision
Testing, AWX & CI/CD
AWX / Automation Platform
Job templates, surveys, RBAC, schedules, and the web UI.
What Is AWX?
AWX is the open-source upstream of Red Hat Ansible Automation Platform. It provides a web UI, REST API, RBAC, credentials management, and scheduling for Ansible. It turns command-line playbooks into a managed automation service.
# AWX Components
# Web UI - Browser-based interface for all operations
# REST API - Programmatic access to everything
# Tower CLI - Command-line tool for AWX
# Job Templates - Playbooks exposed as one-click operations
# Credentials - Encrypted storage for secrets
# Inventories - Host definitions managed by AWX
# Projects - Git repositories containing playbooks
# Schedules - Cron-like automation triggersAWX wraps Ansible in a managed service with audit trails, RBAC, and scheduling.
Job Templates
---
- name: Create AWX job template
hosts: localhost
connection: local
tasks:
- name: Create deploy template
ansible.controller.job_template:
name: "Deploy Application"
project: "Infrastructure Ansible"
playbook: "playbooks/deploy.yml"
inventory: "Production"
credential: "SSH Deploy Key"
ask_variables_on_launch: yes
ask_limit_on_launch: yes
job_type: "run"
state: present
controller_host: "https://awx.example.com"
controller_username: "admin"
controller_password: "{{ awx_password }}"
validate_certs: yesJob templates define what playbook runs, against which inventory, with which credentials. Users select a template and click Launch.
Surveys
---
- name: Create deploy template with survey
hosts: localhost
connection: local
tasks:
- name: Create job template
ansible.controller.job_template:
name: "Deploy Application"
project: "Infrastructure Ansible"
playbook: "playbooks/deploy.yml"
inventory: "Production"
ask_variables_on_launch: yes
surveys:
- name: "deploy_version"
description: "Git tag or branch to deploy"
type: "text"
required: yes
min: 1
max: 50
- name: "target_environment"
description: "Target environment"
type: "multiplechoice"
required: yes
choices:
- "staging"
- "production"
state: presentSurveys present a form to the user before launching a job. They collect inputs like versions, environment names, or feature flags.
Credential Management
# Credential Types
# Machine - SSH keys for connecting to hosts
# Vault - Ansible Vault password
# SCM - Git repository access
# Cloud - AWS/Azure/GCP credentials
# Network - Network device credentials
# Custom - User-defined credential types
# Custom credential type for API tokens
- name: Define custom credential type
ansible.controller.credential_type:
name: "API Token"
description: "Custom API token for external services"
inputs:
fields:
- id: token
type: string
label: API Token
secret: yes
injectors:
env:
API_TOKEN: "{{ token }}"AWX credentials are encrypted and scoped. Users reference credentials by name — they never see the actual values.
Schedules
---
- name: Create schedule
hosts: localhost
connection: local
tasks:
- name: Schedule nightly backup
ansible.controller.schedule:
name: "Nightly Backup"
unified_job_template: "Backup Playbook"
rrule: "DTSTART:20240101T020000Z RRULE:FREQ=DAILY;INTERVAL=1"
state: present
controller_host: "https://awx.example.com"
controller_username: "admin"
controller_password: "{{ awx_password }}"Schedules use iCalendar RRULE syntax. This schedule runs the backup playbook nightly at 2 AM UTC.
AWX is the free, open-source upstream. Red Hat Ansible Automation Platform adds enterprise features — supported execution environments, analytics, and compliance reporting.
Mark this lesson complete to store local progress and unlock a cleaner resume path the next time you visit.