Automation · Runbook Automation
Preconditions
Cheat sheet · https://pcornel.dk/topic.php?topic=5551
Answer
Preconditions in runbook automation verify the situation before acting, such as the alert still being active, the host reachable and no other runbook running against it.
Remember
- Check the alert is still active and the target is reachable.
- Check no other runbook is running on the target.
- Fail early with a clear message.
First checks
- Precondition checks (health, maintenance window, approvals) — guards
- Abort messages — clarity
- Logged results — evidence
Verify in this order
preconditions → proceed/abort
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=5551