Skip to content

lbesnard/Fleet-Control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

185 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛸 Fleet-Control: Homelab Infrastructure

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.


📂 Repository Architecture

.
├── 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

🚀 Quick Start

1. Provision Hardware

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 apply

2. Prepare Ansible Environment

Ensure 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 ./collections

3. Run Configuration

Execute 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

🛠️ Management Commands

Proxmox (Terraform)

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

Configuration (Ansible)

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published