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.
More on Playbook Design, Handlers and Idempotency
Your playbook reports `changed` on every run for a task that runs a shell command. How do you fix it?BeginnerNginx must reload only when its config file actually changes.BeginnerA task fails halfway and its handler never ran, but the config file was changed. The next run shows no change and the service never reloads.AdvancedYou need three tasks to notify one handler, and want it to run once. Is that automatic?BeginnerYou need to deploy a binary only if it is missing or its checksum differs.IntermediateHow do you safely edit one line in `/etc/ssh/sshd_config` and be sure SSH keeps working?Intermediate