`--check` shows no change but the real run changes things. Why?
AdvancedScenarioPerformance, Testing and CI/CD
Answer
Situation read → Check mode is a prediction.
What I'd do → Look for tasks that depend on earlier skipped tasks' results, command/shell tasks skipped in check mode (so registered values are empty), and modules without check support.
Why → If task B reads a file task A would have created, B sees the old state in check mode.
Interview tip → Use check_mode: false only for read-only tasks, and test in a throwaway environment for full confidence.
More on Performance, Testing and CI/CD
A playbook that touches 200 hosts takes 40 minutes. Where do you start tuning?IntermediateYou install 15 packages with a loop and it is slow.BeginnerHow would you test a role in CI before it reaches production?IntermediateWhat would a Molecule `verify.yml` check for an Nginx role?IntermediateMolecule's idempotence step fails. How do you find the offending task?IntermediateDesign a CI pipeline for an Ansible repo.Advanced