Infra Collection
Tested Ansible roles for Linux servers that run Docker.
In short
Infra Collection is an Ansible collection of 28 roles for Ubuntu servers that run Docker: the base system, security, a reverse proxy and apps such as Harbor, mailcow, Paperless-ngx, n8n and Tandoor. Every role is configured only through checked variables and tested end to end, including a second run that must change nothing.
- Who is it for?
- Anyone who sets up and maintains Ubuntu servers with Ansible and wants to stop copying one-off playbooks between projects.
- Runs on
- AnsibleUbuntu 24.04Ubuntu 26.04Docker
- What does it cost?
- Nothing. The source is open, under the MIT license.
What it’s about
Every new server starts the same way. You copy the playbook from the last project, change a few values and hope nothing in it has gone stale. A year later you have five versions of the same tasks, and none of them have been tested.
Infra Collection puts those tasks in one place. It is a set of Ansible roles for Ubuntu servers that run Docker. We use it for our own servers. Each role is set up only through variables that are checked before anything changes on the server, and each one is tested end to end before a release.
What it does
The base of a server
- Packages, time zone, automatic updates, swap and SSH hardening.
- Docker with the compose plugin, a login banner and zsh with Oh My Zsh.
Network and security
- Tailscale, optionally as a subnet router, and internal DNS names.
- Traefik with certificates, optional error pages and Anubis bot protection.
- fail2ban and CrowdSec, with one shared list of networks that never get banned.
Apps
- Harbor, mailcow, Paperless-ngx, Tandoor, n8n and listmonk, each with a backup before every update. Four of them also roll back on their own when an update fails.
- Portainer, a Dashy start page and Pulsix.
- CloudPanel, installed and kept up to date.
Building blocks for web servers
- nginx, Node.js, Redis, MariaDB and MySQL, each pinned to a series.
- PHP in the versions you choose, and Composer at a fixed version.
Tested
- Every role runs end to end in containers, and a second run must change nothing.
- A release needs a signed, green test result for the code it ships.
Getting started
Add the collection to your requirements.yml:
collections:
- name: https://github.com/NoiXdev/ansible-collection-infra.git
type: git
version: v0.6.0
Then run ansible-galaxy collection install -r requirements.yml. The documentation walks you through your first playbook and has a guide for every role and all variables. Questions and ideas are welcome on GitHub.
Infra Collection compared
We like the other tools too. Here they are, side by side and honest.
| Infra Collection | geerlingguy roles | DebOps | Your own playbooks | |
|---|---|---|---|---|
| Comes as | one collection | one role per repository | collections | whatever you build |
| Systems | Ubuntu 24.04 and 26.04 | many distributions | Debian and Ubuntu | your choice |
| Installed from | Git, a pinned tag | Ansible Galaxy | Ansible Galaxy or pip | your repository |
| Automated tests | end to end before every release | Molecule in CI | CI | up to you |
| License | MIT | MIT / BSD | GPL-3.0 or later | yours |
As of November 2026. No guarantee of accuracy; corrections welcome as an issue.
When something else fits better
Not every tool fits every job. In these cases we'd point you somewhere else ourselves:
When your servers run something other than Ubuntu, or you only need a single building block such as Docker or nginx.
When your servers run Debian, or you want a framework with many more roles.
Frequently asked questions
How do I install the collection?
Add the Git repository with a pinned tag such as v0.6.0 to your requirements.yml and run ansible-galaxy collection install -r requirements.yml. It needs ansible-core 2.16 or newer.
Is it on Ansible Galaxy?
No. You install it straight from GitHub, pinned to a release tag.
Which servers does it support?
Ubuntu 24.04 and 26.04, the releases the roles are tested on. A few roles have limits, for example php and cloudpanel run on Ubuntu 24.04 only for now and mysql on amd64 only.
What happens when an app update fails?
Harbor, mailcow, listmonk, Paperless-ngx, Tandoor and n8n back up first. listmonk, Paperless-ngx, Tandoor and n8n take a database dump before every update (the last three also copy their files) and roll back when the update fails. Harbor and mailcow do not roll back. After a failed update they leave a marker that stops every further run until you have checked things, and Harbor stays stopped until then.
Can I use only some of the roles?
Yes. Your playbook lists the roles it needs. Most app roles expect Docker on the host, which the docker role installs. On a mailcow host, install Docker from Docker's own packages instead.
Is it stable?
It is at version 0.x, so variables can still change between minor releases. Pin a tag and read the changelog before you move to the next one.
Something broken, or missing?
An issue in the repository is the quickest way. For wishes and questions too.
Open an issueRather ask directly?
Our Discord is where we help out, and so do other people who use the tool.
Join the DiscordFrom the logbook
- New project
New: Infra Collection, tested Ansible roles for your servers
28 Ansible roles for Ubuntu servers that run Docker. From the base system to apps like Harbor, mailcow and Paperless-ngx, each one tested before it is released.