This project showcases a robust and automated approach to deploying and managing a homelab environment using Ansible. The primary goal is to provide a simple, repeatable, and scalable way to deploy a variety of services as rootless Podman containers.
Project Highlights
- Automation with Ansible: The entire deployment process is automated using Ansible playbooks, ensuring consistency and reducing manual effort.
- Rootless Podman Containers: Services are deployed in rootless Podman containers, enhancing security by avoiding the need for a privileged daemon.
- Service-Oriented Architecture: The project is structured around services, with each service having its own set of configurations, quadlets, and tasks. This modular design makes it easy to add, remove, or modify services.
- Centralized Configuration: The project uses a centralized inventory and group variables to manage the configuration of different hosts and services.
- Secrets Management: The project integrates with HashiCorp Vault for managing secrets, ensuring that sensitive information is stored securely.
- Extensible and Scalable: The project is designed to be easily extensible, allowing for the addition of new services and hosts with minimal effort.
Deployed Services
The project deploys a wide range of services, including:
- Authentication: Authentik for centralized identity and access management.
- Backup: Borgmatic for regular, automated backups.
- Databases: A central database service providing PostgreSQL, InfluxDB, and MongoDB.
- Developer Tools: A collection of useful online tools for developers, and Windmill for building internal tools.
- Automation: n8n for workflow automation.
- AI/ML: OpenWebUI for a user-friendly web interface for LLMs.
- Search: Searx-ng for a privacy-respecting metasearch engine.
- Networking: Unifi Network Application for managing Unifi network devices.
- Password Management: Vaultwarden, an unofficial Bitwarden server implementation.
Technical Details
The core of the project is the rootless_services.yaml playbook, which orchestrates the deployment of all services. This playbook iterates through the defined services and includes the corresponding installation tasks. The init.yaml playbook is used to prepare the servers by installing necessary dependencies and configuring the environment.
The project makes extensive use of Ansible roles and Jinja2 templates to create a flexible and maintainable deployment process. Quadlet files are used to define the Podman containers, and these are generated from templates to allow for dynamic configuration.
This project is a testament to the power of automation and containerization in building and managing a modern homelab. It demonstrates a practical and effective approach to deploying a variety of services in a secure, scalable, and maintainable way.