Runbook Template
Copy this template when creating new runbooks. Runbooks document repeatable procedures with explicit steps, validation commands, and rollback procedures.
Template
= [RUNBOOK-YYYY-MM-DD] Procedure Name
:description: Brief description of what this runbook accomplishes
:author: Your Name
:revdate: YYYY-MM-DD
:icons: font
== Overview
Brief description of the procedure and when to use it.
=== Prerequisites
* [ ] Prerequisite 1
* [ ] Prerequisite 2
* [ ] Required access/permissions
=== Scope
* *In Scope:* What this runbook covers
* *Out of Scope:* What this runbook does NOT cover
== Variables
Define variables at the start for easy customization:
[source,bash,subs=attributes+]
----
HOSTNAME="example-host"
TARGET_IP="10.50.1.100"
----
== Procedure
=== Phase 1: Preparation
==== 1.1 Verify Prerequisites
[source,bash]
----
# Verify connectivity
ping -c 3 ${TARGET_IP}
----
.Expected Output
----
3 packets transmitted, 3 received, 0% packet loss
----
==== 1.2 Backup Current State
[source,bash]
----
# Backup current configuration
cp /etc/config /etc/config.backup.$(date +%Y%m%d)
----
=== Phase 2: Execution
==== 2.1 Step Name
[source,bash]
----
# Command to execute
command --option value
----
[NOTE]
====
Important notes about this step.
====
==== 2.2 Validation
[source,bash]
----
# Verify the change
validation-command
----
.Expected Output
----
Expected output here
----
=== Phase 3: Verification
==== 3.1 Functional Test
[source,bash]
----
# Test that the change works
test-command
----
==== 3.2 Cleanup
[source,bash]
----
# Remove temporary files
rm -f /tmp/temp-file
----
== Rollback
If issues occur, follow these steps to revert:
[source,bash]
----
# Restore backup
cp /etc/config.backup.$(date +%Y%m%d) /etc/config
----
== Troubleshooting
=== Issue: Common Problem
*Symptom:* Description of the problem
*Cause:* Why it happens
*Resolution:*
[source,bash]
----
# Fix command
fix-command
----
== Post-Execution Checklist
* [ ] Verified service is running
* [ ] Tested functionality
* [ ] Updated documentation
* [ ] Notified stakeholders
== Related
* xref:related-runbook.adoc[Related Runbook]
* External documentation link
Runbook Naming Convention
| Prefix | Purpose | Example |
|---|---|---|
|
Standard operational procedure |
|
|
Incident response procedure |
|
|
Deployment procedure |
|
|
Disaster recovery procedure |
|
Best Practices
-
Be explicit - Include exact commands, not just descriptions
-
Include validation - Every step should have a verification command
-
Show expected output - So operators know if the command succeeded
-
Provide rollback - Every procedure should be reversible
-
Use variables - Make runbooks reusable across environments
-
Test first - Validate runbooks in non-production before use
Example Runbooks
See these runbooks for reference:
-
Vault PKI Certificate Issuance (infra-ops)
-
Backup Strategy (infra-ops)
-
Linux AD Auth dACL (ise-linux)