Interview Prep/Ansible/Inventory and Targeting

How would you run the same playbook against a single host to test, without editing the playbook?

BeginnerScenarioInventory and Targeting
Answer

Situation read → A safe canary run.

What I'd do →

ansible-playbook site.yml --limit web01 --check --diff
ansible-playbook site.yml --limit web01

Why → --limit confines the blast radius, --check --diff previews the changes, and then the real run on one host tells you whether to proceed.

Interview tip → Say you start with one host, then 10%, then everyone: that is serial in a production rollout.

All Ansible questions Roadmap: Ansible

More on Inventory and Targeting