Pcornel
Automation · Validation

Preflight Checks

Cheat sheet · https://pcornel.dk/topic.php?topic=5918

Back to the Topic

Answer

Preflight Checks gather decision-grade evidence immediately before automation starts so unsupported, unsafe or impossible operations fail before mutation.

Remember

  • Preflight pass ≠ execution safe indefinitely.
  • Endpoint reachable ≠ required operation authorized.
  • Capacity available now ≠ capacity guaranteed during execution.
  • Rollback artifact exists ≠ rollback is valid or tested.

First checks

  • Preflight script (reachability, versions, capacity, maintenance window) — checks
  • ansible all -m ping — reachability
  • Abort on preflight failure — safety

Commands

ansible-playbook --syntax-check <playbook.yml>
Read-only/validation observation for Ansible playbook YAML/parser/module-reference syntax before execution.

Verify in this order

preflight → pass → proceed / fail → abort

Where it usually breaks

Preflight Checks prove conditions observed before execution; mutable target state can invalidate them and must be rechecked where races or long delays matter.

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Preflight Checks validation proof-boundary map

BoundaryHealthy evidenceSuspicious evidence
Criteria / inputCriteria, source revision, validator and exact target identity are explicitA generic pass exists without versioned criteria or target correlation
Preconditions / operationCurrent authoritative facts are bound to the exact operationStale preflight or requested state substitutes for execution-time facts
Effective outcomeAuthoritative state/read-back and service-relevant evidence match the expected resultTool/test/validator success substitutes for effective target or workload proof
Limits / next actionCoverage limits, unknowns and failures drive the next narrower checkUnknown evidence becomes pass, retries hide failures or broad success is inferred from one check

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5918

Confirmation

Confirm action

Continue?