infrastructure housekeeping ansible

This entry covers the two-day housework that was overdue. The work falls into two distinct phases: Wednesday's head2 retirement and Thursday's storage1 purge, plus the collateral that emerged — a massively expanded lab manual and an ansible.cfg trimmed from 695 lines to 10.

WEDNESDAY Head2 Retirement: Phase One

The retired head2 host had been decommissioned for some time, but its hostname and IP were still hard-coded across a surprising number of files in the ansible collection. These weren't just historical references — they were live config entries that would cause failures on any future deployment.

Affected Files (Wednesday's Sweep)

CategoryFiles ChangedType
DNS zone filesdb.bitsmasher.lab, db.bitsmasher.research, db.rev.0.10.10.in-addr.arpaZone records removed/updated
TLS CA configca-bitsmasher.net/json/head2-csr.json (deleted), openssl.cnf, cfssl_setup.sh, generate_certs.shCertificate signing requests, CSR templates deleted
K3s bootstrap scriptsk3s_server/files/bootstrap_cluster.sh, install_k3s.shHardcoded control plane hostname replaced with dynamic lookup
Kerberos confighandlers/main.yml, meta/main.yml (Galaxy format), configure.yml, kerberos_client.yml, kerberos_server.yml, sssd.yml, kdc.conf.j2KDC references updated, Galaxy-compliant metadata
DHCP configdhcpd.conf, list.txtDHCP scope updates
OpenBSD bootstrapfiles/home/bin/bootstrap.shScript path and reference update
TLS READMEREADME.mdDocumentation updated to remove head2 references
k3s_install scriptsfiles/k3s_status.sh (1 line)Control plane reference
Network scriptsnetwork_update.sh (+ .bak preserved as audit trail)Active script updated, .bak kept for historical record
Manual docskubernetes.tex, hardware.tex, network.tex, dns.tex, history.texDocumentation references updated; retirement noted in comments where appropriate
Retention policy: Two files retained head2 only in historical comments noting its retirement date. These are treated as the audit trail — they document when and why head2 left the lab. All live code paths were confirmed clean.

The Manual That Grew From 6 Lines to 1,654

While doing the retirement sweep, it became obvious that the lab manual at docs/manual/ was barely worth the name. It had six lines of content and a missing _header.tex file.

The new manual is 1,654 lines spanning eight chapters covering infrastructure foundations, core services (NTP, DNS, Kerberos/LDAP, TLS, network security), compute (Kubernetes clusters, containers), storage (Samba AD + NFS), development automation (ansible collection linting with ansible-test), and user documentation. Each chapter maps to existing markdown documents in docs/markdown/ or new content derived from infrastructure state.

The most substantive section is the Ansible linting infrastructure chapter, which documents the three-tool pipeline (ansible-lint + yamllint + ansible-test sanity) across all 44 roles and proposes a lint_all.sh script as the CI integration point.

THURSDAY Storage1 Purge: Phase Two

After Wednesday's head2 cleanup, the next dead reference was /mnt/storage1 — a mount point no longer in use but still hard-coded across 29 files. This was the trickier sweep because storage1 appeared in live code paths: bootstrap scripts, FSTAB entries, NFS defaults, DHCP configs, Samba templates, and K3s registry settings.

The replacement topology uses /mnt/backup1 + /mnt/snowy as the two active storage locations, matching the current NFS landscape described in MEMORY.md:

Old PathNew TargetFiles Changed
/mnt/storage1/workspace/lab-franklin/ansible(local-relative path in ansible.cfg)ansible.cfg, .envrc (.ansible path)
/mnt/storage1 (FSTAB)(removed from chonk fstab)chonk/files/etc/fstab
NFS exports referencing storage1/mnt/backup1 + /mnt/snowynfs/defaults/main.yml, nfs/tasks/nfs_client.yml (52-line simplification)
DHCP/static mapping to storage1Updated hostnamesdhcp/files/dhcpd.conf, list.txt
Samba share templates referencing storage1/mnt/backup1 + /mnt/snowy pathssmb.conf-thelio.j2, smb.conf-storage1.j2, smb.conf-snowy.j2
Container registry registries.yamlUpdated endpoint refscontainer_registry/files/registries.yaml
Minecraft vars, Pi internal vars, ssh keysNo path changes needed (corrected metadata)minecraft/vars, pypi_internal/vars, ssh/tasks
ansible.cfg trimmed from 695 lines to 10: The massive config file contained every default Ansible option commented out. Replaced with only what's non-default: collections_paths (two locations), roles_path, inventory, remote_tmp, and minimal privilege escalation config. This also shipped .yamllignores (51 entries) and .yamllint configs at the collection root level.

OLLAMA Bind Update

The .envrc was updated to bind OLLAMA_HOST to 0.0.0.0:11434, making the inference service available on all interfaces rather than localhost-only. This supports the broader node connectivity plan for using chonk as the primary inference host across the lab.

Risk Summary

RiskMitigation
DNS zone disruption from head2 record removalZones validated with named-checkzone post-modification; no live records depended on head2 hostnames
TLS certificate chain breakagehead2-csr.json deleted but the CA root and intermediate certs remain intact; only expired renewal artifacts were removed
NFS mount failures from storage1 path changesBackup mounts on /mnt/backup1 and /mnt/snowy verified operational; all NFS exports updated in same commit
K3s cluster control plane referencesbootstrap scripts use dynamic hostname resolution post-change; validated via ansible-playbook --syntax-check