{"canonical_url":"https://engineer.company/portfolio/servers-you-can-rebuild-from-scratch/","content_markdown":"# Infrastructure defined in a repository\n\nBuilt the company's own infrastructure as 19 Ansible playbooks and 34 roles across 12,065 lines of YAML, converging a live host to a declared state with every play idempotent.\n\nAugust 2026\n\n**Situation.** Engineer ApS maintains its own infrastructure as code. The repository covers deployed public services and the configuration of other components, including backup and mail automation whose operational activation is a separate step. Capturing that scope in code makes the setup inspectable rather than dependent on memory.\n\n**Task.** The whole estate had to be described in a repository rather than in a head, and described in a form that converges a real host rather than documenting one.\n\n**Action.** The recorded implementation comprises 19 playbooks and 34 roles across 12,065 lines of YAML; these figures describe that recorded stage, not the current repository size. The shape matters more than the size. Composition is data rather than flags: a host sits in a tier group whose variables declare which roles it runs, so provisioning with no arguments converges every host to its declared state. Idempotence is a contract rather than an aspiration — a converged host reports zero changes, and a play that cannot say that is not finished. Four command namespaces keep the promises apart: a gate that touches no host, reports that read one and never change it, provisioning that changes a host to match the repository, and verification that changes a host on purpose and returns a verdict.\n\n**Result.** The repository supplies the configuration for rebuilding the declared environment, and the parts of it that were only ever true because somebody remembered them are now assertions that fail a run. The cost is real: every change is slower to make than editing a file on the server would be, and a converge that half‑applies is worse than one that refuses, which is why a preflight play was later added in front of it. That trade was made deliberately and it has held.\n\n---\n\n- Role: Infrastructure Automation Engineer\n- Categories: [Platform Architecture](https://platform.engineer.company/categories/platform-architecture/), [DevOps](https://platform.engineer.company/categories/devops/), [Infrastructure](https://platform.engineer.company/categories/infrastructure/), [Automation \u0026 CI/CD](https://platform.engineer.company/categories/automation/), [Reliability \u0026 Backups](https://platform.engineer.company/categories/reliability/), [Linux \u0026 Servers](https://platform.engineer.company/categories/linux/), [System Administration](https://platform.engineer.company/categories/system-administration/), [Documentation](https://platform.engineer.company/categories/documentation/)\n- Services: [Cloud Infrastructure \u0026 Migration](https://platform.engineer.company/services/cloud-infrastructure/), [Infrastructure as Code](https://platform.engineer.company/services/infrastructure-as-code/), [DevOps \u0026 CI/CD Automation](https://platform.engineer.company/services/devops-cicd/), [System Administration](https://platform.engineer.company/services/system-administration/)\n\n\u003chttps://engineer.company/portfolio/servers-you-can-rebuild-from-scratch/\u003e\n","date_modified":"2026-11-12T05:34:23Z","description":"The repository supplies the configuration for rebuilding the declared environment, and the parts of it that were only ever true because somebody remembered…","formats":{"gemtext":"https://platform.engineer.company/portfolio/servers-you-can-rebuild-from-scratch/index.gmi","gopher":"https://platform.engineer.company/portfolio/servers-you-can-rebuild-from-scratch/gophermap","html":"https://platform.engineer.company/portfolio/servers-you-can-rebuild-from-scratch/","json":"https://platform.engineer.company/portfolio/servers-you-can-rebuild-from-scratch/index.json","markdown":"https://platform.engineer.company/portfolio/servers-you-can-rebuild-from-scratch/index.md","pdf":"https://platform.engineer.company/portfolio/servers-you-can-rebuild-from-scratch/index.pdf"},"kind":"page","language":"en","title":"Built the company platform as 19 Ansible plays","url":"https://platform.engineer.company/portfolio/servers-you-can-rebuild-from-scratch/","version":1}