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 |