Commit Graph
13 Commits
Author SHA1 Message Date
mrcharles edb9e4c5e3 feat(security): add auditd/journald/logrotate role
Port Modules/Security/secharden-audit-agents.sh.

Deploys hardened configurations for:
- auditd (log rotation, disk space actions, email alerts)
- systemd-journald (persistent storage)
- logrotate (weekly rotation, 4 weeks retention)

This role is disabled by default (run_security_audit: false) matching
the legacy script which was commented out of the run order.

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-30 12:16:38 -05:00
mrcharles 703053430c feat(security): add two-factor authentication role
Port Modules/Security/secharden-2fa.sh.

Configures TOTP two-factor authentication via Google Authenticator for:
- SSH (publickey + keyboard-interactive)
- Cockpit web interface (PAM with Google Authenticator)
- Webmin (if installed, TOTP provider enabled)

Includes:
- Backup of existing SSH, PAM, and Cockpit configs before changes
- PAM sshd and cockpit config deployment
- Per-user enrollment scaffolding (setup script + instructions for
  root and localuser)
- SSH service validation before restart

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-30 12:16:32 -05:00
mrcharles fa41137eb4 feat(security): add SCAP/STIG baseline hardening role
Port Modules/Security/secharden-scap-stig.sh.

Applies baseline STIG controls:
- GRUB config permission hardening (root:root, mode 0400), skipped on Pi
- Disable and purge autofs service
- Blacklist unused filesystem/kernel modules (usb-storage, dccp, rds,
  sctp, tipc, cramfs, freevxfs, hfs, hfsplus, jffs2, squashfs, udf)
- Deploy login banners (/etc/issue, /etc/issue.net, /etc/motd)
- Harden cron permissions (cron.allow 0600, cron.deny removed)
- Harden at permissions (at.allow 0600, at.deny removed)

This role is the seed for the full DISA STIG/CMMC compliance library.

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-30 12:16:25 -05:00
mrcharles af18104f7b feat(security): add Wazuh agent role
Port Modules/Security/secharden-wazuh.sh.

Installs the Wazuh agent from the official apt repository with the
configured manager address. The agent package is held to prevent
uncontrolled upgrades. Skipped entirely on the Wazuh server host
(tsys-nsm) via the wazuh_server inventory group.

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-30 12:16:19 -05:00
mrcharles cefe2f7cfa feat(security): add SSH hardening role
Port Modules/Security/secharden-ssh.sh.

Deploys:
- Authorized keys for root, localuser, subodev (conditional on existence)
- Hardened /etc/ssh/sshd_config (skipped on dev workstations)
- ssh-audit hardening drop-in for algorithm restrictions (skipped on
  Ubuntu where it breaks openssh-server)
- Lockdown of sshd_config.d directory permissions

SSH service is validated (sshd -t) before restart.

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-30 12:16:13 -05:00
mrcharles 3919ff400d feat(oam): add LibreNMS/check_mk monitoring agent role
Port Modules/OAM/oam-librenms.sh.

Deploys the check_mk agent and systemd socket for LibreNMS monitoring,
along with the local plugins: distro, dmi, dpkg, ntp-client,
os-updates, postfixdetailed, and postfix-queues.

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-30 12:16:07 -05:00
mrcharles 50c3f50d11 feat(system-config): add system service configuration role
Port global-systemServiceConfigurationFiles() and
global-postPackageConfiguration().

Manages:
- Global zsh config (/etc/zshrc)
- Mail aliases and postfix relay (local-only, smarthost to Cloudron)
- Static DNS resolv.conf (replaces systemd-resolved symlinks)
- rsyslog forwarding to LibreNMS (skipped on LibreNMS server itself)
- DHCP client config (skipped on DHCP servers pfv-netinfra-01/02)
- SNMP daemon config selected by host class (Pi/physical/Proxmox/VM)
- NTP client config (skipped on NTP server hosts)
- LLDP network discovery
- Cockpit disallowed-users
- Default user shells (zsh, conditional on user existence)
- Process accounting (accton)
- CPU governor on physical/Proxmox hosts (performance)
- tuned profile on VM guests (virtual-guest)

Infrastructure configs use Jinja2 templates parameterized by variables
in group_vars/all.yml.

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-30 12:16:02 -05:00
mrcharles 78c8ba2208 feat(packages): add package management role
Port global-installPackages() and scripts/up2date.sh.

Features:
- Deploy /usr/local/bin/up2date.sh helper for operators
- Install webmin and tailscale apt repositories
- apt dist-upgrade + autoremove (up2date equivalent)
- Remove unwanted packages (systemd-timesyncd, chrony, telnet, etc.)
- Install fleet toolset with platform-aware filtering:
  - Proxmox hosts: skip cockpit/tuned (conflicts with PVE)
  - Kali hosts: skip unavailable packages (latencytop, fonts-powerline)
- Install KVM guest agent on virtual guests
- Install bare-metal power/perf packages on physical AND Proxmox hosts

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-30 12:15:56 -05:00
mrcharles 3672227f94 feat(preflight): add host-class detection role
Port PreflightCheck.sh and pi-detect.sh to the preflight role.

Detects at runtime:
- Physical Dell host (dmidecode, NOT Proxmox, NOT Pi)
- Proxmox VE host (dpkg-query proxmox-ve)
- Virtual guest (virt-what: hyperv/kvm)
- KVM guest specifically
- Raspberry Pi (device-tree model file)
- Distro: Debian, Ubuntu, Kali
- User existence: localuser, subodev

Derives from inventory groups:
- NTP server, DHCP server, DNS server
- LibreNMS server, Wazuh server
- Dev workstation

All facts are cacheable so downstream roles can branch on them without
re-running detection commands.

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-30 12:15:50 -05:00
mrcharles 6eedfb7344 feat(playbooks): add hello world and setup new system playbooks
Add two playbooks:

- hello_world.yml: AWX smoke test that asserts Debian-family OS and
  reports facts. Use this as the first Job Template to confirm AWX
  can reach hosts, become root, and gather facts.

- setup_new_system.yml: Full host provisioning playbook that mirrors
  the function call order of SetupNewSystem.sh. Each role is gated by
  a run_* feature toggle so the same template can do partial runs.

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-30 12:15:43 -05:00
mrcharles 754b47fb37 feat(inventory): add fleet inventory with all host groups
Add inventory/hosts.yml with real fleet hostnames organized into
functional groups:

- proxmox_hosts: 7 physical Dell hypervisors (pfv-tsys1/3/4/5/6/7/9)
- virtual_guests: VMs running on Proxmox (tsys-awx, tsys-librenms, etc.)
- ntp_servers: pfv-netinfra-01/02, pfv-netboot (skip client config)
- dhcp_servers: pfv-netinfra-01/02 (skip dhclient.conf deploy)
- dns_servers: Technitium/Pi-hole hosts
- librenms_server: tsys-librenms (skip rsyslog forward)
- wazuh_server: tsys-nsm (skip agent install)
- dev_workstations: subopi-dev, CharlesDevServer, kali-tsys
- kubernetes_nodes: control plane and worker nodes

Add inventory/group_vars/all.yml with all tunable variables (packages,
DNS servers, NTP servers, postfix relayhost, feature toggles) that
mirror the hard-coded values from the legacy bash scripts.

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-30 12:15:36 -05:00
mrcharles 7a2ad022c8 chore: add Ansible project scaffolding
Add ansible.cfg (roles_path, inventory, become, fact caching),
requirements.yml placeholder for future collections, .gitignore for
Ansible artifacts, and .ansible-lint config for code quality.

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-30 12:15:30 -05:00
mrcharles 81a811aedd docs: update AGENTS.md with auto-commit and push policy
Make explicit that agents must commit and push automatically after every
logical unit of work — never wait to be asked.

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-30 12:15:24 -05:00