infra/ansible
2026-06-04 14:40:02 -05:00
..
baseline/proxmox fix: resolve best practice and lint violations 2026-06-04 14:34:23 -05:00
docs/plans resolvers: serve DoH via Caddy, add IPv6 records and PQ SSH 2026-05-14 10:10:46 -05:00
group_vars cleanup: remove forgejo, fix ssh key paths, fix tracking issues, update docs 2026-06-04 14:27:31 -05:00
host_vars cleanup: remove orphaned host_vars/db.aprs.me.yml (superseded by db.w5isp.com) 2026-06-04 14:39:29 -05:00
roles fix: add template defaults, remove alpine ref, fix ssh -t flag 2026-06-04 14:37:08 -05:00
scripts update 2026-01-30 17:27:52 -06:00
vars cleanup and reorg 2026-01-08 16:29:16 -06:00
.ansible-lint fix: resolve best practice and lint violations 2026-06-04 14:34:23 -05:00
.gitignore cleanup: remove forgejo, fix ssh key paths, fix tracking issues, update docs 2026-06-04 14:27:31 -05:00
ansible-bootstrap.cfg ansible cleanup 2025-07-23 12:34:33 -05:00
ansible.cfg fix: resolve best practice and lint violations 2026-06-04 14:34:23 -05:00
bootstrap-hosts cleanup and reorg 2026-01-08 16:29:16 -06:00
bootstrap.sh add ansible 2025-05-30 13:24:38 -05:00
bootstrap.yml fix: resolve best practice and lint violations 2026-06-04 14:34:23 -05:00
CLAUDE.md cleanup: remove forgejo, fix ssh key paths, fix tracking issues, update docs 2026-06-04 14:27:31 -05:00
findings.md docs: mark alpine role finding as resolved in findings.md 2026-06-04 14:40:02 -05:00
hosts cleanup: remove dead code and stale files 2026-06-04 14:35:28 -05:00
LICENSE.md add ansible 2025-05-30 13:24:38 -05:00
Makefile cleanup: remove broken makefile targets, fix general.yml references 2026-06-04 14:37:55 -05:00
netbox.yml fix: resolve best practice and lint violations 2026-06-04 14:34:23 -05:00
notes.txt add ansible 2025-05-30 13:24:38 -05:00
playbook.yml fix: resolve best practice and lint violations 2026-06-04 14:34:23 -05:00
playbook_handlers.yml ansible cleanup 2025-07-23 12:34:33 -05:00
README.md cleanup: remove forgejo, fix ssh key paths, fix tracking issues, update docs 2026-06-04 14:27:31 -05:00
regenerate-ssh-keys.yml update to reflect 380 prod 2026-03-10 10:05:17 -05:00
requirements.yml cleanup: remove dead code and stale files 2026-06-04 14:35:28 -05:00
run.sh add ansible 2025-05-30 13:24:38 -05:00
setup-host.sh add ansible 2025-05-30 13:24:38 -05:00
update_dns.sh updates 2026-02-17 08:26:29 -06:00

Ansible Infrastructure Management

This repository contains Ansible playbooks and roles for managing infrastructure across multiple environments.

Directory Structure

├── playbook.yml          # Main playbook (common, firewall, DNS, monitoring, etc.)
├── bootstrap.yml         # Bootstrap playbook for new hosts
├── netbox.yml            # Standalone NetBox deployment playbook
├── hosts                 # Inventory file
├── ansible.cfg           # Ansible configuration
├── requirements.yml      # Collection and role dependencies
├── group_vars/           # Group-specific variables
│   ├── all/              # Global variables
│   ├── bind9_servers/    # BIND9 zone configurations
│   └── resolvers/        # Resolver configurations
├── host_vars/            # Host-specific variables
├── vars/                 # Legacy base variables
├── roles/                # Ansible roles (26 roles)
│   ├── base/             # Base configuration (users, SSH, system)
│   ├── general/          # General system configurations
│   ├── caddy/            # Caddy web server
│   ├── firewall/         # UFW/firewalld management
│   ├── ns/               # BIND9 nameserver
│   ├── resolvers/        # Unbound DNS resolver
│   ├── tailscale/        # Tailscale VPN
│   ├── monitor/          # Icinga2 monitoring
│   ├── prometheus/       # Prometheus monitoring stack
│   └── ...               # Other roles (see playbook.yml for all)
├── baseline/             # Proxmox baseline configuration
├── fact_cache/           # Ansible fact cache (gitignored)
└── findings.md           # Audit findings and recommendations

## Quick Start

### Bootstrap a new host
```bash
# For hosts with existing user access
make bootstrap-init HOSTNAME=hostname ANSIBLE_HOST=ip_address

# Full bootstrap with network config and reboot
make bootstrap HOSTNAME=hostname ANSIBLE_HOST=ip_address

Run playbooks

# Run main playbook
./run.sh

# Run on specific host
ansible-playbook -l hostname playbook.yml

# Run with specific tags
ansible-playbook -t caddy playbook.yml

Inventory Groups

  • vntx_servers - VNTX network services (logs, radius, vpn, netbox, unimus, monitor, librenms, uisp)
  • home_servers - Home network services (skippy, mail, dokku, aprs, staging, prom)
  • bind9_servers - BIND9 authoritative nameservers
  • resolvers - Unbound DNS resolvers
  • caddy_servers - Servers running Caddy web server
  • monitoring_servers - Icinga2 monitoring master
  • prometheus_servers - Prometheus monitoring stack
  • postgresql_servers - PostgreSQL database servers
  • proxmox_servers - Proxmox virtualization hosts

See hosts file for the full inventory.

Key Features

  • Automated user management with GitHub SSH key integration
  • Base package installation across all systems
  • Role-based configuration management
  • Support for multiple OS families (Debian, Ubuntu, AlmaLinux)
  • Tailscale VPN integration
  • Caddy web server with automatic SSL
  • BIND9 authoritative DNS with DNSSEC
  • Unbound DNS resolvers
  • Icinga2 monitoring with PagerDuty integration
  • Prometheus/Grafana/Loki monitoring stack
  • NetBox IPAM/DCIM
  • Proxmox VM provisioning
  • LibreNMS network monitoring