Use this when runbooks must confirm success.
Verification · Runbook Automation
Verification in runbook automation checks that the runbook achieved its goal, such as the service responding or the alert clearing, before reporting success.
1. Verify the outcome, not just command success.
2. Health checks and metrics.
3. Escalate if verification fails.
4. Record evidence.
5. Close tickets automatically on success.
runbook actions → verification → success/escalate
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
git diff --exit-code <baseline-ref> -- <managed-path>Primary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Command read-back and what it shows Verify boundary
git diff --exit-code <baseline-ref> -- <managed-path> is the bounded verification surface selected for Runbook Automation → Verification. A known-good result is the executed runbook revision is the approved one, mandatory checkpoints complete as designed, independent target read-back matches the intended state and the original service test succeeds. Treat wrong procedure revision, skipped/failed required checkpoint, nominal completion without target convergence or a recovered target with unresolved adjacent regression as broken/suspicious. The Git baseline diff shows source differences for the runbook/configuration artifact only, but it does not show which revision executed or that the target postcondition was achieved.
Step 2 Verification path Verify boundary
Verification is insufficient if it only shows that syntax parsed, transport accepted a request, a controller queued work, or a workflow ended.
Step 3 Common mistakes Narrow the fault
- Verification steps missing.
Step 4 Observation-driven branch and next-check logic Narrow the fault
For a failing Runbook Automation → Verification case, freeze scope first: target/object, desired revision or request, and failure time. Inspect git diff --exit-code <baseline-ref> -- <managed-path>. Branch on evidence rather than labels: if runbook version differs from approved baseline, stop and resolve procedure identity; if step/checkpoint failed, branch on that dependency before continuing; if all steps report success but target postcondition fails, inspect asynchronous/downstream state rather than rerunning blindly.
- Verification checks the goal was achieved.
- Examples: service responds, alert clears.
- Report the outcome.
- Verification checks (service up, metric normal) — success
- Automatic alert resolution check — outcome
- Failure notification — escalation
ReferenceHow it works1 section · depth on demand
How it works
In Runbook Automation → Verification, effective state is split across runbook version identity, executed step results, expected checkpoints and the independent postcondition that determines whether the runbook accomplished its operational objective. A runbook may complete steps sequentially or conditionally; verification must bind the execution to a versioned procedure and independently read back the target state rather than treating step success as the outcome. Human approvals, external APIs, credentials, asynchronous jobs and eventual consistency remain separate things to check. This matters because all runbook steps can exit successfully while the intended service state is absent, and a target that looks correct can have been reached by a different/unapproved procedure version.
ReferenceImportant terms & boundaries1 section · depth on demand
Method
Runbook verification proves the runbook achieved its goal, not just that its commands exited cleanly.
1. Define success criteria per runbook (service responds, alert clears, queue drains).
2. After the action, poll the criteria with a timeout.
3. Compare with the pre-action state captured at the start.
4. Mark the job failed if criteria are not met, and run rollback or escalate.
5. Attach evidence (command output, metrics) to the ticket.
- name: Verify service health
ansible.builtin.uri: { url: "https://{{ inventory_hostname }}/health", status_code: 200 }
register: h
retries: 10
delay: 15
until: h.status == 200
A restart that "succeeded" but left the service unhealthy must show as a failed runbook.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Runbook Automation > Verification. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/azure/automation/automation-runbook-types · confidence 94%