Skip to content

Ansible

Ansible handles configuration management across my entire homelab. From initial host setup to ongoing maintenance, if a server needs configuring, Ansible does it.

My Setup

Environment Overview

  • Control Node: Dedicated management VM
  • Inventory: Dynamic + static inventory files
  • Vault: Ansible Vault for secrets (separate from HashiCorp Vault)
  • Integration: Triggered via GitLab CI/CD pipelines

Topics

Guide Description Status
Getting Started Ansible installation and first playbook In Progress
Playbook Patterns Reusable playbook structures Planned
Roles Creating and using Ansible roles Planned
Inventory Management Static, dynamic, and group vars Planned

Quick Reference

# Test connectivity
ansible all -m ping -i inventory/hosts

# Run a playbook with verbose output
ansible-playbook -i inventory/hosts playbook.yml -vv

# Dry run
ansible-playbook -i inventory/hosts playbook.yml --check --diff

# Encrypt a file with Ansible Vault
ansible-vault encrypt secrets.yml