Three cheatsheets covering Terraform, Ansible, and Systemd — provisioning, configuration management, and service supervision for production servers.
Three cheatsheets covering the infrastructure-as-code and provisioning tools every DevOps engineer works with daily: Terraform for declarative infrastructure, Ansible for procedural configuration, and Systemd for the service supervision layer underneath both.
The three tools solve different problems and get used together constantly — this bundle keeps all three within arm's reach.
Terraform Cheatsheet
state mv, import existing resourcesAnsible Cheatsheet
when conditionsSystemd Cheatsheet
State is the most dangerous file in your repository. The sheet covers the safe patterns:
# Never edit state by hand — use targeted moves
terraform state mv aws_instance.old aws_instance.new
# Import an existing resource into management
terraform import aws_instance.web i-0abc123def456
# Check for drift without applying changes
terraform plan -detailed-exitcode
# exit 0 = no changes, 1 = error, 2 = changes present
# /etc/systemd/system/backup.timer
[Unit]
Description=Nightly backup
[Timer]
OnCalendar=*-*-* 02:30:00
Persistent=true # catch up after downtime — cron can't do this
[Install]
WantedBy=timers.target
Persistent=true is the reason to prefer timers over cron on any machine that reboots: a missed run during downtime executes once the machine is back, instead of silently skipping.
| Layer | Tool | Why | |---|---|---| | Cloud resources (VMs, networks, buckets) | Terraform | Declarative, drift-detectable, provider-managed | | On-host configuration (packages, configs) | Ansible | Procedural, idempotent over SSH | | Service supervision | Systemd | The layer both tools end up writing unit files for |
The classic boundary: Terraform creates the server, Ansible configures it, Systemd keeps the service running. The bundle's sheets cross-reference each other at these boundaries.
$14.00
OpenTofu or Terraform?
The syntax is identical for everything in the sheet. Where the registries or CLI names differ (tofu vs terraform), the sheet notes both.
Does the Ansible sheet cover Ansible Navigator and execution environments?
It covers the classic ansible-playbook CLI plus a section on ansible-navigator for containerized execution environments, since most new deployments standardize on the latter.
Are the cheatsheets updated? Yes — buyers get re-download access to new revisions through the library page.