Interview Prep/Ansible/Playbook Design, Handlers and Idempotency

How do you run a playbook against a host without making any change but see what would differ?

BeginnerScenarioPlaybook Design, Handlers and Idempotency
Answer

Situation read → Pre-change review.

What I'd do →

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

Why → --check predicts changes where modules support it and --diff shows file differences. Tasks using command/shell are skipped in check mode unless they set check_mode: false.

Interview tip → Check mode is a prediction, not a guarantee, especially when later tasks depend on earlier ones.

All Ansible questions Roadmap: Ansible

More on Playbook Design, Handlers and Idempotency