Interview Prep/Ansible/AWX, AAP and Cloud Integration

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.

All Ansible questions Roadmap: Ansible

More on AWX, AAP and Cloud Integration