Commit Graph

16 Commits

Author SHA1 Message Date
directlx 90ed5c1edb Add storage remediation playbooks and comprehensive audit documentation
This commit introduces a complete storage remediation solution for critical
Proxmox cluster issues:

Playbooks (4 new):
- remediate-storage-critical-issues.yml: Log cleanup, Docker prune, audits
- remediate-docker-storage.yml: Deep Docker cleanup with automation
- remediate-stopped-containers.yml: Safe container removal with backups
- configure-storage-monitoring.yml: Proactive monitoring and alerting

Critical Issues Addressed:
- proxmox-00 root FS: 84.5% → <70% (frees 10-15 GB)
- proxmox-01 dlx-docker: 81.1% → <75% (frees 50-150 GB)
- Unused containers: 1.2 TB allocated → removable
- Storage gaps: Automated monitoring with 75/85/95% thresholds

Documentation (3 new):
- STORAGE-AUDIT.md: Comprehensive capacity analysis and hardware inventory
- STORAGE-REMEDIATION-GUIDE.md: Step-by-step execution with timeline
- REMEDIATION-SUMMARY.md: Quick reference for playbooks and results

Features:
✓ Dry-run modes for safety
✓ Configuration backups before removal
✓ Automated weekly maintenance scheduled
✓ Continuous monitoring with syslog integration
✓ Prometheus metrics export ready
✓ Complete troubleshooting guide

Expected Results:
- Total space freed: 1-2 TB
- Automated cleanup prevents regrowth
- Real-time capacity alerts
- Monthly audit cycles

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-08 13:22:53 -05:00
directlx 7754585436 Enable MySQL connectivity for Docker applications
- Add MySQL host_vars with firewall rules for port 3306
- Enable IP forwarding on Docker hosts (hiveops, smartjournal)
- Fix container-to-external-network connectivity issue

The IP forwarding setting was previously disabled by the common role's
security defaults, preventing Docker containers from reaching external
databases. This change overrides that setting for hosts running Docker.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-06 11:30:14 -05:00
directlx de76f5c6a8 Update Pi-hole DNS playbook for v6
Pi-hole v6 uses pihole.toml hosts array instead of custom.list.
Updated playbook to modify toml config directly via Python script.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:56:31 -05:00
directlx d7c7b82314 Disable firewall on smartjournal
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:50:29 -05:00
directlx 047b485a13 Add host_vars for firewall configuration
- docker.yml: Disable firewall (Docker manages iptables)
- hiveops.yml: Disable firewall (many ports needed)
- npm.yml: Allow ports 22, 80, 443, 81 (admin)
- smartjournal.yml: Allow ports 22, 80, 443

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:49:31 -05:00
directlx b2151858da Add Pi-hole host_vars for firewall ports
Allow required ports for Pi-hole:
- 22/tcp (SSH)
- 53/tcp, 53/udp (DNS)
- 80/tcp (Web admin)
- 443/tcp (HTTPS)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:25:46 -05:00
directlx 066bf45b0e Add Proxmox group_vars to disable UFW
Proxmox uses its own firewall (pve-firewall) and doesn't need UFW.
This prevents accidental lockout of web UI (port 8006).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:21:14 -05:00
directlx c4bdaa0e57 Add Pi-hole DNS management playbook
- playbooks/pihole-dns.yml: Configure local DNS records
- templates/pihole-custom-list.j2: DNS records template

Domain: lab.directlx.dev
Records for all infrastructure hosts with short and FQDN names.

Usage: ansible-playbook playbooks/pihole-dns.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:01:35 -05:00
directlx 9576810dad Add Proxmox cluster hosts
- proxmox-00 (192.168.200.10)
- proxmox-01 (192.168.200.11)
- proxmox-02 (192.168.200.12)

All running Debian 13.3

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 08:43:18 -05:00
directlx 94be59bb26 Add common role, scripts, and documentation
- ansible.cfg: Set remote_user to dlxadmin
- inventory: Add infrastructure, application hosts with IPs
- group_vars/all.yml: Set ansible_user to dlxadmin
- playbooks/site.yml: Enable common role
- roles/common: Baseline configuration role
  - Package installation (Debian/RedHat/Arch)
  - Timezone and locale setup
  - User management with SSH keys
  - SSH hardening
  - UFW firewall and security settings
- scripts/create-user.sh: Create ansible user on servers
- USAGE.md: Project usage documentation
- HOSTS.md: Infrastructure host inventory

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 08:33:36 -05:00
directlx 35d6965fab Add connectivity test playbook
Tests SSH connectivity and displays basic host info (OS, version).

Usage: ansible-playbook playbooks/ping.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 06:56:58 -05:00
directlx d841e04a39 Add SSH setup script for passwordless authentication
Script handles:
- Generating ed25519 SSH key if not present
- Setting up SSH for existing users
- Creating new users via admin account with:
  - Home directory and .ssh setup
  - sudo/wheel group membership
  - Passwordless sudo configuration
- Connection verification

Usage: ./scripts/setup-ssh.sh <ip> <user> [admin_user]

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 06:55:19 -05:00
directlx 3000e13e0e Add infrastructure hosts to inventory
Added hosts organized by role:
- dbservers: postgres, mysql, mongo
- webservers: nginx, npm (nginx proxy manager)
- infrastructure: docker, pihole
- control: ansible-node

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 06:51:43 -05:00
directlx 171e32db26 Merge remote main with local Ansible project structure 2026-02-04 06:45:26 -05:00
directlx c781ec25a2 Initial Ansible project structure
Set up standard directory layout with:
- ansible.cfg with sensible defaults
- YAML inventory with example groups
- Main site playbook template
- Directories for roles, group_vars, host_vars, files, templates
- .gitignore for secrets, vault files, and SSH keys

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 06:37:33 -05:00
directlx 89515d12a5 Initial commit 2026-02-04 11:26:42 +00:00