Interview Prep/Ansible/AWX, Cloud and Large-Scale Operations

A 2 AM incident: a bad config went to all web servers. How do you roll back with Ansible?

AdvancedScenarioAWX, Cloud and Large-Scale Operations
Answer

Situation read → Fast, controlled rollback.

What I'd do →

  1. Check out the last known good commit/tag.
  2. Run the same playbook with serial and the previous version variable.
  3. Verify health; notify.
  4. Fix forward later through the normal pipeline.
git checkout v1.8.3
ansible-playbook deploy.yml -e app_version=1.8.3 --limit web

Why → Config as code means rollback is a redeploy of an older commit.

Interview tip → Keep previous release directories on the host for instant symlink rollback.

All Ansible questions Roadmap: Ansible

More on AWX, Cloud and Large-Scale Operations