This is the checklist you run in the last minute before a production run, with your hand on the keyboard. Everything on it is either a one-line command or a question you already know the answer to. It is deliberately the shortest checklist in this course, because a pre-flight nobody has time for is a pre-flight nobody runs.
It assumes the other checklists have already been done. The playbook was reviewed once, the role was reviewed once, the inventory was verified once. This one asks a different question: is the thing about to run the thing that was reviewed, against the hosts you think, with the stops still in place?
Running it as one block
The commands are written so that no output means pass. That makes the whole thing pasteable - export the two variables, run it, and read whatever it prints.
export VAULT_PASS_FILE="$HOME/.ansible/vault-pass-prod"
export LIMIT="web"
export PLAY="playbooks/deploy.yml"
export INV="inventories/production"
ansible-playbook -i "$INV" "$PLAY" --syntax-check
ansible-playbook -i "$INV" "$PLAY" --limit "$LIMIT" --list-hosts
echo "$(ansible -i "$INV" "$LIMIT" --list-hosts | tail -n +2 | wc -l) hosts"
Anything it prints is something to read before you press return. Anything it does not print, you have confirmed.
What a failure means
Stop. Every critical item here is a reason not to run, and none of them takes
more than a minute to resolve or to escalate. The cost of stopping at this
point is the cost of a delayed change; the cost of continuing is whatever the
item was protecting you from.
The three warn items - lint, tests, monitoring - are confirmations that a
gate further upstream really did fire on this commit. A failure there is a
process problem to raise afterwards, not necessarily a reason to abort, but it
does mean you are running with less assurance than you thought.
Access this needs
The revision, environment, inventory, pattern, variable, batching and threshold
checks are all local reads: a checkout, the controller virtualenv, and nothing
on the network except the git fetch. The secrets check needs the vault
password. The staging and canary runs connect to hosts in check mode, so they
need credentials and they will open SSH connections - but they change nothing.
Where the evidence goes
The commit hash and the host count go into the change record before the run, not after. They are the two facts that make a post-incident review possible: what ran, and where. Everything else can be reconstructed from the log; those two cannot, because after the fact the branch has moved and the inventory has changed.
Sign-off
- Operator: _________________ Time: ___________
- Change reference: _______________________