Configuration Management Troubleshooting
Cheat sheet · https://pcornel.dk/topic.php?topic=5389
Answer
Troubleshoot configuration management by running in check or verbose mode, reading which resource or task failed, checking variable precedence, facts and inventory, and connectivity and privileges on the target.
Remember
- Check mode shows what would change.
- Variable precedence explains wrong values.
- Facts may be stale.
First checks
ansible-playbook site.yml -vvv --limit <host>— verboseansible <host> -m setup— factsansible-playbook site.yml --start-at-task '<task>'— resume
Commands
ansible-inventory --list- Print the parsed inventory, including groups and host variables, as JSON.
Verify in this order
controller → host → task → module → error
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5389