IoC for my homelab using opentofu
Find a file
2026-02-17 18:49:15 +01:00
ansible fix(wings): ensure clean service startup and correct volume permissions 2026-02-09 20:49:59 +01:00
docs add TODOs for migrating .env variables to Ansible vault 2026-02-17 18:49:15 +01:00
opentofu feat(pelican): add initial setup for Pelican stack including configuration for panel and wings 2026-02-08 03:07:53 +01:00
services feat(Z2M): add force update option for temperature sensor in Home Assistant configuration to avoid issues with Sonoff TRV falling back to internal sensor when temperatures doesn't change 2026-02-16 21:00:52 +01:00
.env.example feat: include Asnible mosquitto role and authorize to MQTT broker 2026-01-25 14:01:46 +01:00
.gitignore feat(pelican): add initial setup for Pelican stack including configuration for panel and wings 2026-02-08 03:07:53 +01:00
AGENTS.md feat(docs): add DNS architecture documentation and implementation plan 2026-02-16 15:17:34 +01:00
README.md init implementation ansible still figuring things out 2026-01-13 20:05:47 +01:00
Taskfile.yml implement task ansible:update SERVICE=<name> 2026-02-07 11:53:11 +01:00

Infrastructure Monorepo

This repository manages my home lab infrastructure using OpenTofu for provisioning and Ansible for configuration management.

Structure

.
├── opentofu/       # Infrastructure Provisioning (VMs, Storage, DNS)
│   ├── main.tf
│   └── ...
├── ansible/        # Configuration Management (Software, Docker, Mounts)
│   ├── inventory/
│   ├── roles/
│   └── site.yml
└── ...

1. Provisioning (OpenTofu)

The opentofu/ directory contains the Infrastructure as Code definitions for Proxmox.

Quick Start:

cd opentofu
tofu init
tofu plan
tofu apply

Key Resources:

  • VMs: Defined in main.tf and vms-new.tf.
  • Templates: Debian 13 cloud image template.
  • State: Local state file (backed up, git-ignored).

2. Configuration (Ansible)

The ansible/ directory manages the software and configuration inside the VMs.

Prerequisites:

cd ansible
ansible-galaxy install -r requirements.yml

Dynamic Inventory: This project uses the Proxmox dynamic inventory plugin to find VMs. You must export your Proxmox credentials as environment variables before running playbooks:

export PROXMOX_API_ENDPOINT="https://192.168.1.10:8006/"
export PROXMOX_USER="root@pam"
export PROXMOX_TOKEN_ID="your-token-id"
export PROXMOX_TOKEN_SECRET="your-token-secret"

Running Playbooks:

# Verify inventory
ansible-inventory -i inventory/proxmox.yml --graph

# Run the main playbook
ansible-playbook -i inventory/proxmox.yml site.yml

Documentation