ansible-infra
# ~/projects/ansible-infra.yml
ansible-infra:
status: active
started: 2026-08-04
tags: [ansible, collection]
repo: https://github.com/fabbrito/ansible-infraI kept writing the same Ansible for every VPS I set up, and sometimes split it across separate
repositories so one project’s scope didn’t leak into another’s. So on 2026-08-04 I pulled that
shared baseline out into one collection, fabbrito.infra. The repositories that use it keep only
what’s theirs: the service roles, the inventory, the secrets and the converge itself.
It covers the parts of a host no host is interesting for: OS settings and unattended upgrades, SSH hardening, a deny-by-default firewall with fail2ban, Docker, backups to Cloudflare R2 through rclone, Caddy for TLS, and a metrics and logs stack bound to loopback and the tailnet. Several VPS servers at the startup I worked for ran on it, though I don’t know whether they still do since I left. Today it converges the hosts of Magellan, my sensor pipeline: a Raspberry Pi 2 B and an Oracle Cloud VM.
How it got here
It started with VMs only. Magellan brought a board into my fleet, and on 2026-09-14 I began a
separate collection for it, fabbrito.embed, scoped to Debian boards. The two were similar and this
one was older, so I folded embed into it: v2.0.0, on 2026-09-25, made every host either a VM or a
board, and v2.3.0, on 2026-09-29, cleaned up what embed had left behind on a host. It has run fine
since.
Checking its own work
A converge reaches a host over the same path it reconfigures, so one of the earliest decisions was
that a converge can never lock me out. The firewall rate-limits the port sshd actually listens on
before its policy flips to deny-by-default, and the sshd role validates its merged configuration
before it reloads. A preflight role refuses an unsupported platform before anything changes.
Past that, each role asserts its preconditions and reads back its result, so fail2ban, for one, has to show its jails loaded, which a service reported as active doesn’t prove.
There’s no CI, here or in any of my repositories: as a single developer working quickly, I’d rather run everything from my terminal through local make targets than rely on GitHub Actions. The gate climbs from static checks on every commit, through a dry-run against a real host with its diff read, to a second converge that has to report no changes.
Where it stands
At v2.3.0, tested on Ubuntu 24.04 and later on amd64 and arm64, Debian 13 on amd64, and Raspberry Pi OS Trixie on armhf. Other ARM targets are claimed but untested, and Debian 12 isn’t a target. A consumer installs it from a git tag, so it pins a version and upgrades on purpose.