awx [options] <resource> <action> [arguments]. This guide covers common usage patterns and workflows.
Command Structure
Every AWX CLI command follows this format:- global-options: Configuration flags like
--conf.host,-f,-v - resource: The type of AWX object (users, jobs, projects, etc.)
- action: The operation to perform (list, get, create, modify, delete, etc.)
- arguments: Action-specific parameters
Discovering Resources
To see all available resources:users- User accountsorganizations- Organizationsprojects- Project definitionsinventories- Inventory definitionsjob_templates- Job templatesjobs- Job executionscredentials- Credentials- And many more…
Discovering Actions
To see available actions for a resource:list- List all resourcesget- Get a specific resource by ID or namecreate- Create a new resourcemodify- Update an existing resourcedelete- Delete a resource
launch, update, monitor, etc.
Basic Operations
Listing Resources
List all resources of a type:Getting a Specific Resource
Retrieve by ID:Creating Resources
Create a new resource:Modifying Resources
Update an existing resource:Deleting Resources
Delete by ID or name:Advanced Operations
Filtering Lists
Filter results using query parameters:Pagination
By default, the CLI returns the first page of results. To get all pages:Sorting
Sort results by field:Working with JSON/YAML Data
Many fields accept JSON or YAML input:File References
For fields containing file data (like SSH keys):Special Actions
Launching Jobs
Launch a job template:Monitoring Jobs
Watch job output in real-time:Updating Projects
Trigger a project update:Inventory Updates
Update an inventory source:Working with Relationships
Associating Resources
Associate credentials with job templates:Disassociating Resources
Granting and Revoking Permissions
Grant roles to users:Bulk Operations
Bulk Host Creation
Bulk Host Deletion
Bulk Job Launch
Import/Export
Exporting Resources
Export all resources:Importing Resources
Import from JSON:Configuration Commands
View Current Configuration
View System Settings
Modify Settings
Control Resources
Some resources provide metadata or system information:Ping
Check API connectivity:Config
View AWX configuration:Me
View current user information:Metrics
View system metrics:Working with Ad Hoc Commands
Run ad hoc commands:Output Formatting Examples
JSON Output (Default)
Human-Readable Tables
YAML Output
JQ Filtering
All Fields
Practical Examples
Create a Complete Job Template
Monitor Job History
Backup and Restore
Tips and Best Practices
- Use
--helpliberally - Every resource and action has detailed help - Use names instead of IDs - More readable and maintainable
- Use
--allfor listings - Ensures you get all results, not just first page - Use
-f humanfor exploration - Easier to read during development - Use
-f jsonfor automation - Consistent, parseable output - Use
--monitorduring development - See job output in real-time - Use
--waitin scripts - Ensures jobs complete before continuing - Store credentials in environment - More secure than command-line flags
- Use
@filefor large data - Cleaner than inline JSON - Enable verbose mode for debugging -
awx -vshows HTTP requests