Interview Prep/Ansible/Rapid-Fire Commands

How do you see which hosts a playbook would run against, without running it?

BeginnerProductionRapid-Fire Commands
Answer
ansible-playbook -i inventories/prod playbooks/site.yml --limit web --list-hosts

Always run this before a prod change with a new --limit pattern. It prints hosts per play and catches patterns that match far more (or fewer) hosts than intended.

All Ansible questions Roadmap: Ansible

More on Rapid-Fire Commands