Automate Your Homelab: Ansible, Cloud-Init, OpenTofu and Git for a Proxmox Lab You Can Rebuild in an Afternoon
Automate Your Homelab turns a pile of machines that were set up by hand, and can only be repaired by hand, into a lab you can rebuild: the definitions live in Git, the secrets live in a vault, the data lives in your backups, and a timed rebuild drill proves the three fit together. Every step uses real commands, YAML and HCL checked against the projects' official docs in October 2026, with diagrams instead of walls of text.
What you get
- Your lab in Git: a self-hosted Forgejo repository, a push mirror, and a repo layout that scales from three VMs to thirty, with secrets kept out of it
- A golden image with cloud-init: the Debian 13 cloud image turned into a Proxmox template with qm, SSH keys, a vendor snippet, and full clones that personalize themselves on first boot
- VMs and containers declared with OpenTofu and the bpg/proxmox provider, a least-privilege API token, and how to read a plan before anything is destroyed
- Ansible that sticks: inventory, ansible.cfg, idempotency, --check and --diff
- A baseline role for every Debian box: users, SSH hardening with a drop-in, unattended-upgrades and time sync
- Docker hosts and compose stacks deployed from the repository, with secrets in ansible-vault
- What's realistic for OPNsense and Home Assistant: scheduled config backups into Git and a documented restore path, not fake "full management"
- CI on Forgejo Actions: ansible-lint and tofu validate on every push, a manual deploy job, drift checks, and the rebuild drill step by step
58 pages, 22 diagrams plus a chapter-opener graphic for every chapter, a checklist and a cheat sheet. PDF and EPUB. Homelab the Right Way, Book 9.
Not sure yet? Read the free sample first: the cover, the full table of contents and all of Chapter 3, "Golden Images with Cloud-Init" (the official Debian cloud image turned into a Proxmox template, and clones that come up with the right hostname, user, key and address on first boot), at https://payhip.com/b/yql34
Also in a bundle: Everything Bundle: every ebook in the store, $89 ยท Homelab Bundle, $59. Code RIGHTWAY20 = 20% off any order through Oct 31.