Available ansible playbooks • Terraform • Home Assistant • Network • Kubernetes Manifests
This repository contains the ansible playbooks, terraform modules and kubernetes manifests to provision my home network environment. Ansible vault files that contain secrets haven't been committed to the public repo.
First install the tools needed
brew install --cask 1password/tap/1password-cli
brew install ansible
brew install terraform
brew install kubectl
terraform init
terraform apply -var-file="prod.tfvars"
ansible-galaxy install -r requirements.yml
ansible-playbook -i inventory.ini provision-homelab.yml
- PFsense is managed by hand
- Unifi equipment is managed by hand
- Terraform spins up all VMs
- Ansible is used for provisioning those + other computers and bootstrapping the k3s cluster
- ArgoCD deploys everything under ./kubernetes
See the documentation here
- Intel NUC i3-8109U/16Gb RAM/480Gb running Proxmox
- AMD Ryzen 3700 NAS running Proxmox with 21Tb of usable space
- Raspberry PI 3b+ running Raspberry Pi OS
- Netgate SG-3100 with Pfsense as router/firewall/dns/vpn
- Unifi access points and switches
The Home Assistant instance currently runs on a VM inside a proxmox in a intel nuc, with a friend mqtt gateway running on a old Raspberry PI 3b+.
The configurations can be found roles/home_assistant. Most of the integrations are through MQTT whenever it's available. Overview of connections
InfluxDB is used for long time data storage of the sensor data.
- Traefik as a reverse proxy
- Mosquitto as a MQTT broker
- Home Assistant
- Zigbee2MQTT with a Conbee II stick for various zigbee device communications
- Ble2MQTT Gateway (https://github.com/lordthorzonus/ble2mqtt-gateway) for BLE sensors
- Sensors
- Xiaomi Aqara water and door/window sensors
- Xiaomi Miio illuminance sensor
- Netatmo weather station
- Aeotec motion sensors
- RuuviTags
- MiFlora Flower Care sensors
- Energy
- Shelly plug S for monitoring energy usage and remote control of some devices
- Home Assistant Glow for energy monitoring
- Lights
- Philips hue lamps for everything inside
- Ledvance smart+ outdoor plug for Balcony lights
- Google
- Nest hub as a command center, tts target and voice assistant
- Media
- Samsung Q8 Smart TV
- Denon X3400H AVR network receiver
- Vacuum
- Roborock S7
Set the proxmox variables
cp example.tfvars prod.tfvars
terraform init
terraform plan -var-file="prod.tfvars"
terraform apply -var-file="prod.tfvars"
The inventory.ini is updated manually for now. So run first the terraform if you are provisioning new servers and modify inventory.ini after that.
First remember to
ansible-galaxy install -r requirements.yml
ansible-playbook playbooks/your-playbook.yml -i inventory.ini
Available playbooks are in ./playbooks
- Use terraform to spin up the k3s nodes.
- Run
ansible-playbook playbooks/bootstrap-k3s-cluster.yml -i inventory.ini
for boostrapping the cluster - ArgoCD will deploy the rest