Understanding Projects
A Project in AWX:- Contains Ansible playbooks, roles, and related files
- Syncs content from SCM (Source Control Management) systems
- Can be assigned to an organization
- Requires appropriate credentials for private repositories
- Supports multiple SCM types: Git, Subversion, Red Hat Insights, and Remote Archive
Project Types
SCM-Based
Projects synced from version control (Git, SVN) - recommended approach
Manual
Playbooks manually placed in the project directory on the AWX server
Insights
Projects that sync from Red Hat Insights
Remote Archive
Projects from remote archive files (tar, zip)
Creating a Git Project
Prepare Your Repository
Ensure your Git repository contains:
- Ansible playbooks (
.ymlor.yamlfiles) - Optional:
roles/directory - Optional:
group_vars/andhost_vars/ - Optional:
collections/requirements.yml - Optional:
roles/requirements.yml
Create via Web UI
- Navigate to Projects in the left sidebar
- Click Add
- Fill in the project details:
- Name: Descriptive project name
- Organization: Select the organization
- Default Execution Environment: Optional EE
- Source Control Type: Select “Git”
- Source Control URL: Your repository URL
- Source Control Branch/Tag/Commit: Branch name (default: master/main)
- Source Control Credential: Select if private repo
- Configure SCM options:
- Clean: Discard local changes before sync
- Delete: Remove project before sync
- Track submodules: Track Git submodules
- Update on Launch: Update before running jobs
- Click Save
Project Configuration Options
SCM Update Behavior
- Update on Launch
- Cache Timeout
- Allow Override
scm_update_on_launch: When enabled, the project syncs from SCM before each job run.Use when:
- Playbooks change frequently
- You want the latest code for every job
- CI/CD pipelines push regular updates
SCM Authentication
Supported Credential Types
- Username/Password: Basic authentication
- SSH Key: For SSH URLs (
[email protected]:...) - Personal Access Token: GitHub, GitLab tokens
Working with Git Branches
Specifying Branches
Branch Override in Job Templates
Whenallow_override is enabled:
Advanced SCM Options
Git Refspec
Fetch additional references beyond the default branch:- Testing pull requests
- Accessing non-standard refs
- Fetching multiple branches
Git Submodules
Track Git submodules in your project:Clean and Delete Options
- Clean
- Delete on Update
git clean -fdx)Manual Projects
For manual projects without SCM:Project Signing and Verification
AWX supports content verification using GPG signatures:Updating Projects
Manual Update
- Web UI
- API
- Ansible
- Navigate to Projects
- Click the sync icon next to the project
- Monitor the update status
Scheduled Updates
Schedule regular project syncs:Viewing Project Playbooks
List available playbooks in a project:Collections and Roles
AWX automatically installs collections and roles defined in your project:Collections
Createcollections/requirements.yml:
Roles
Createroles/requirements.yml:
Collections and roles are installed during project updates and are cached for subsequent job runs.
Execution Environments
Assign a default execution environment to the project:Project Permissions
Grant users and teams access to projects:- Admin: Full control over the project
- Use: Use project in job templates
- Update: Trigger project updates
- Read: View project details
Troubleshooting
Project update fails with authentication error
Project update fails with authentication error
Check your SCM credential:
- Verify credential username and password/token
- For SSH, ensure the key is correct
- Check repository permissions
Playbooks not appearing in project
Playbooks not appearing in project
Ensure:
- Files have
.ymlor.yamlextensions - Files are valid Ansible playbooks (start with
---and contain plays) - Project update completed successfully
- Check project update logs for errors
Collections or roles not installing
Collections or roles not installing
Check:
- Requirements files are named correctly (
requirements.yml) - Requirements files are valid YAML
- AWX has internet access (or access to your Galaxy server)
- Review project update logs
Project stuck in 'pending' status
Project stuck in 'pending' status
Check:
- AWX task manager is running
- Instance groups are available
- Review
/var/log/tower/logs on AWX server
Best Practices
Use SCM
Always use SCM-based projects instead of manual projects for better version control
Enable Updates
Enable update-on-launch for development, disable for production (use manual updates)
Branch Strategy
Use stable branches for production projects, enable override for testing
Cache Timeout
Set appropriate cache timeouts to balance freshness and performance
Related Resources
Job Templates
Create job templates using your projects
Credentials
Set up SCM credentials for private repositories
Execution Environments
Configure execution environments for your projects
Project API
Complete API reference for projects