Ansible config for my homelab
I want to implement these features:
- Automatic testing of the playbook with molecule in Github Actions
- Ability to use same playbook for continuous deployment (CD) triggered from updates to my homelab repository here on Github
This playbook currently goes through these steps to deploy my entire homelab config
---
title: Initial deployment
---
flowchart TD
main("main.yml")
main_pre_tasks("Update apt cache")
main_tasks("Setup Docker
Clone Git Repos")
setup_docker("Ensure Docker is setup")
clone_repos("Clone homelab repository")
clone_ha_repo("Clone repository with config for Home Assistant")
main --> main_pre_tasks
main_pre_tasks --> main_tasks
main_tasks --> setup_docker
main_tasks --> clone_repos --> |If hostname includes HA| clone_ha_repo
This playbook currently uses two roles that I maintain for deploying HyperHDR and a local radio for streaming vinyl records.
When running this playbook here is a list of things that needs to be done first, e.g. collection tokens and creating secrets
I have drawn a lot of inspiration from Jeff Geerling's work with ansible. I also use his book to learn ansible while moving my manual deployment to ansible.
The deployment of HyperHDR is adapted from ztnel's work. I am very thankful for them as their work made it very easy for me to do.