How do you manage AWX configuration as code?
IntermediateProductionAWX, AAP and Cloud Integration
Answer
Click-ops in the AWX UI is unreviewed, untracked production change. We define every object with the awx.awx collection (or ansible.controller for AAP) in a Git repo and apply it from a pipeline.
- name: Job template for web deploy
awx.awx.job_template:
name: "Deploy web - prod"
organization: Platform
project: infra-ansible
playbook: playbooks/deploy_web.yml
inventory: aws-prod
credentials: [prod-ssh, prod-vault]
execution_environment: ee-platform-1.8.0
ask_limit_on_launch: true
state: present
environment:
CONTROLLER_HOST: https://awx.example.com
CONTROLLER_OAUTH_TOKEN: "{{ awx_token }}"
Red Hat's community infra configuration collections offer ready-made roles that read objects from YAML variables. Whatever you use, lock down UI edit rights so the code stays the source of truth.
More on AWX, AAP and Cloud Integration
AWX or Red Hat Ansible Automation Platform: what is the difference and what do you pay for?BeginnerWhat are the core objects in AWX and how do they fit together?BeginnerHow do custom credential types work in AWX?AdvancedHow do you connect AWX to an external secrets manager?IntermediateHow do you trigger AWX jobs from CI or other systems?IntermediateHow do project updates work in AWX, and what does "update revision on launch" trade off?Intermediate