Automation · Templates
Validation
Cheat sheet · https://pcornel.dk/topic.php?topic=5815
Answer
Validation of rendered templates checks the output before deployment, such as nginx -t, a YAML lint, a device config parser or comparing with the golden configuration.
Remember
- Validate with the target's own checker.
- Lint rendered output.
- Compare with golden config.
First checks
nginx -t -c out.conf / sshd -t -f out.conf— syntax validationyamllint out.yaml— structural lint- Batfish/pyATS for network configs — semantic validation
Verify in this order
rendered config → validators → pass/fail
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=5815