- Replace PDF diagrams with PNG images for inline display in docs - Add infrastructure diagram to Homelab actuel category page - Add network diagram to single-machine HA homelab page - Add Docker Swarm vs Kubernetes decision note in docker-compose page - Complete English translations for homepage tagline - Translate homepage tagline dynamically using Docusaurus i18n - Remove PDF diagram files from static assets (homelab-actuel-infra.pdf, homelab-futur-network.pdf) - Add new documentation pages: Docker Compose, Ansible playbooks, Traefik - Add Future Homelab pages: single-machine HA and 3-node Proxmox cluster - Remove example pages and notions category - Update sidebar configuration
2.5 KiB
| sidebar_position |
|---|
| 2 |
Ansible Playbooks
:::info Full English translation coming soon. :::
Ansible is an open-source IT automation tool that enables configuration management, deployment, and infrastructure orchestration. In a homelab context, Ansible has become essential for maintaining reproducible and documented infrastructure.
What is Ansible?
Ansible is an Infrastructure as Code (IaC) tool that allows you to:
- Automate repetitive system administration tasks
- Standardize configurations across multiple machines
- Document infrastructure in executable format (code is documentation)
- Reproduce identical environments easily
- Version infrastructure with Git
Project structure
My Ansible infrastructure is available:
- Online repository: https://forgejo.tellserv.fr/Tellsanguis/Infra_ansible_dockercompose
Ansible roles
The infrastructure uses several roles:
- common: Base system configuration, dnsmasq, firewalld, MergerFS
- cockpit: Web admin interface
- docker: Docker Engine installation and configuration
- services: Docker stack deployment
Secrets management
Secrets are encrypted with Ansible Vault and injected via Jinja2 templates into .env files.
Benefits of this approach
- Reproducibility: Infrastructure can be recreated identically in minutes
- Living documentation: Ansible code documents the infrastructure precisely
- Complete automation: No need to SSH for deployment or updates
- Security: Secrets are encrypted and never committed in plain text
Current Limitations
Despite its many advantages, this approach has limitations:
- Late versioning: The Git repository Infra_ansible_dockercompose was created after the fact to present the work. In the initial practice, Git, automated tests, and CI/CD were not used due to lack of knowledge at the time.
- No automated tests: No automatic playbook validation (Molecule, integration tests)
- Single-machine infrastructure: Ansible is designed to manage multiple servers, but I only manage one
- No CI/CD integration: Deployments are manual, no automated pipeline
These limitations will be addressed in the Future Homelab with the adoption of Kubernetes and GitOps.
:::note Detailed English translation of this page is in progress. :::