Interview Prep/Ansible/AWX, AAP and Cloud Integration

How do you configure instances launched by an Auto Scaling Group?

IntermediateProductionAWX, AAP and Cloud Integration
Answer

Two common patterns when the image is not fully baked:

  1. AWX provisioning callback: user data calls AWX at boot, and AWX runs the job template against just that host.
#!/bin/bash
curl -s -f -X POST -d "host_config_key=${CONFIG_KEY}" \
  https://awx.example.com/api/v2/job_templates/57/callback/

The host must be in the template's inventory, so enable "update on launch" on the inventory source.

  1. ansible-pull in user data: the instance pulls the repo and configures itself, with no central controller involved.

Either way, keep boot-time configuration short. The more you bake into the AMI, the faster and more reliable scale-out becomes; Ansible at boot should only apply instance-specific settings.

All Ansible questions Roadmap: Ansible

More on AWX, AAP and Cloud Integration