Ansible playbooks for managing homelab infrastructure, starting with the "nebula" server.
- ZFS storage setup and management
- Podman with ZFS storage driver
- libvirt/KVM virtualization
- Cockpit web management interface
- Let's Encrypt SSL certificates with Cloudflare DNS validation
- Common system configuration
- Arch Linux server with:
- SSH servuce enabled
systemctl enable --now sshd
- UFW firewall with SSH allowed
ufw allow ssh
- SSH key configured
ssh-copy-id nebula
- User with passwordless sudo access
visudouncomment%wheel ALL=(ALL:ALL) NOPASSWD: ALLrm /etc/sudoers.d/10-installer
- ZFS pool "pool0" ready to import
- SSH servuce enabled
-
Install Ansible collections:
ansible-galaxy collection install -r requirements.yml
-
Update inventory with your server's IP/hostname:
vim inventory.yml
-
Set up Cloudflare API token for Let's Encrypt (optional):
# Copy example vault file cp group_vars/all/vault.yml.example group_vars/all/vault.yml # Edit and encrypt the vault ansible-vault create group_vars/all/vault.yml
-
Run the playbook:
# Without vault ansible-playbook site.yml # With vault for Let's Encrypt ansible-playbook site.yml --ask-vault-pass
- ZFS: Imports "pool0" pool, creates datasets for docker, vms, and data
- Podman: Installed with ZFS storage driver, rootless containers support, Docker compatibility
- libvirt: KVM/QEMU with UEFI support, storage pool on ZFS
- Cockpit: Web interface on port 9090 with modules for VMs, containers, and storage
- Let's Encrypt: Automated SSL certificate management with Cloudflare DNS validation
- Common: System updates, NTP, timezone, performance tuning
- Cockpit: https://nebula:9090
- Podman: Available for rootless containers, Docker-compatible socket at /var/run/docker.sock
- libvirt: Accessible via virt-manager or virsh
- The playbook is idempotent - safe to run multiple times
- Cockpit ZFS module requires AUR access (set
install_aur_packages: truein inventory)