This repository is the central nervous system for my homelab and laptop provisioning. It manages the lifecycle of Proxmox VMs through a "Define once, Deploy anywhere" workflow.
.
βββ terraform/
β βββ brownfunk/ # Hardware definition for the main cluster
β β βββ main.tf
β β βββ variables.tf
β βββ myNewNode/ # Sandbox/Secondary node definitions
β βββ [Go to Terraform Docs](./terraform/README.md)
β
βββ ansible/
β βββ inventory/ # Host definitions
β β βββ brownfunk.ini # Generated by TF (Main fleet)
β β βββ myNewNode.ini # Generated by TF (Experimental nodes)
β βββ collections/ # Local Ansible modules (Git ignored)
β βββ tasks/ # Reusable logic (Docker, LUKS, etc.)
β βββ [Go to Ansible Docs](./ansible/README.md)
β
βββ terraform.tfvars # Global Secrets & API Keys (Git ignored)
βββ .gitignore # Protects state, inventory, and secreto
Navigate to the specific node folder in Terraform. Applying this will trigger the provider to build the VM and use the .tftpl to write the .ini file into the Ansible inventory folder.
cd terraform/brownfunk
terraform init
terraform applyEnsure the local collections are installed into the project (required once, or whenever requirements.yml changes).
cd ../../ansible
ansible-galaxy collection install -r requirements.yml -p ./collectionsExecute the playbook against the specific inventory generated in step 1.
ansible-playbook -i inventory/brownfunk.ini setup_homelabs.yml --ask-vault-pass # or generate a .vault_pass file| Command | Result |
|---|---|
terraform plan |
Check what hardware changes are pending |
terraform refresh |
Sync local state with actual Proxmox status |
terraform apply -compact-warnings |
Clean output during VM creation |
| Command | Result |
|---|---|
ansible-inventory -i inventory/brownfunk.ini --list |
Debug the generated host groups |
ansible-playbook ... --limit "bf-nas*" |
Only run tasks on the NAS node |