seed: add 14 A records + 3 Kea reservations for homelab services #5

Merged
gosseljl merged 4 commits from feature/seed-additional-dns into main 2026-05-10 17:05:56 +00:00
Owner

Summary

Adds the 14 homelab services that the new scripts/discover-undns-vms.py flagged as missing DNS after the VLAN 102 cutover settled. Three of them are dynamic CTs (git, forgejo-runner, patchmon) that needed to be pinned with Kea reservations before getting DNS — otherwise their pool-assigned IP could shift on next renewal and DNS would go stale. The pin uses the MAC and IP each CT already has, so it's a no-op for the running guest.

Changes

netbox/seed-data/objects.yaml

  • 14 new ip_addresses entries (all on 10.0.2.0/24)
  • 13 new dns_records (adsb already existed via legacy migration)
  • 3 new kea_reservations for the dynamic CTs

ansible/roles/kea/defaults/main.yml

  • 3 new kea_reservations mirroring the seed-data additions (live source of truth for Kea config render)

scripts/discover-undns-vms.py

  • now reads CT runtime interfaces (/lxc/{vmid}/interfaces) before falling back to the static ip= config block, matching what the PVE GUI shows

Records added (all under infra.strscrm.io)

Name IP Status Notes
pegaprox 10.0.2.3 active Pegapox PVE automation host
authelia 10.0.2.5 active
tunnel 10.0.2.6 active
frigate 10.0.2.9 dhcp
pulse 10.0.2.12 dhcp
unpoller 10.0.2.13 dhcp
apt-cacher-ng 10.0.2.15 dhcp
kuma 10.0.2.16 dhcp
pbs 10.0.2.40 active
ttrss 10.0.2.105 active
git 10.0.2.146 dhcp + Kea reservation MAC bc:24:11:29:17:15
forgejo-runner 10.0.2.147 dhcp + Kea reservation MAC bc:24:11:d2:55:02
patchmon 10.0.2.148 dhcp + Kea reservation MAC bc:24:11:74:11:d5

Skipped (operator decision)

  • pdm (proxmox-datacenter-manager) — to be deleted
  • dns-01, dns-02 — legacy ISC pair, decom on 2026-05-24 (14-day soak)
  • rhel — offline / placeholder
  • adsb-feeder — already has DNS via the existing adsb reservation at 10.0.2.141

Test plan

  • python3 -c "import yaml; yaml.safe_load(open('netbox/seed-data/objects.yaml'))" passes
  • python3 -c "import yaml; yaml.safe_load(open('ansible/roles/kea/defaults/main.yml'))" passes
  • CI lint workflow green
  • CI ansible-check workflow green
  • After merge, netbox-seed.yml workflow runs idempotently against live NetBox; 14 new IPAM + 13 new DNS records appear
  • After merge, ansible-apply reloads Kea on both nodes (changed=2) and kea-dhcp4 -t validation passes
  • dig @10.0.2.230 git.infra.strscrm.io returns 10.0.2.146 (and similar spot-check for at least one other new record)
  • git/forgejo-runner/patchmon CTs keep their current IPs through next DHCP renewal (Kea reservation honoured)

🤖 Generated with Claude Code

## Summary Adds the 14 homelab services that the new `scripts/discover-undns-vms.py` flagged as missing DNS after the VLAN 102 cutover settled. Three of them are dynamic CTs (`git`, `forgejo-runner`, `patchmon`) that needed to be pinned with Kea reservations before getting DNS — otherwise their pool-assigned IP could shift on next renewal and DNS would go stale. The pin uses the MAC and IP each CT already has, so it's a no-op for the running guest. ## Changes `netbox/seed-data/objects.yaml` - 14 new `ip_addresses` entries (all on `10.0.2.0/24`) - 13 new `dns_records` (`adsb` already existed via legacy migration) - 3 new `kea_reservations` for the dynamic CTs `ansible/roles/kea/defaults/main.yml` - 3 new `kea_reservations` mirroring the seed-data additions (live source of truth for Kea config render) `scripts/discover-undns-vms.py` - now reads CT runtime interfaces (`/lxc/{vmid}/interfaces`) before falling back to the static `ip=` config block, matching what the PVE GUI shows ## Records added (all under `infra.strscrm.io`) | Name | IP | Status | Notes | |---|---|---|---| | pegaprox | 10.0.2.3 | active | Pegapox PVE automation host | | authelia | 10.0.2.5 | active | | | tunnel | 10.0.2.6 | active | | | frigate | 10.0.2.9 | dhcp | | | pulse | 10.0.2.12 | dhcp | | | unpoller | 10.0.2.13 | dhcp | | | apt-cacher-ng | 10.0.2.15 | dhcp | | | kuma | 10.0.2.16 | dhcp | | | pbs | 10.0.2.40 | active | | | ttrss | 10.0.2.105 | active | | | git | 10.0.2.146 | dhcp + Kea reservation | MAC `bc:24:11:29:17:15` | | forgejo-runner | 10.0.2.147 | dhcp + Kea reservation | MAC `bc:24:11:d2:55:02` | | patchmon | 10.0.2.148 | dhcp + Kea reservation | MAC `bc:24:11:74:11:d5` | ## Skipped (operator decision) - `pdm` (proxmox-datacenter-manager) — to be deleted - `dns-01`, `dns-02` — legacy ISC pair, decom on 2026-05-24 (14-day soak) - `rhel` — offline / placeholder - `adsb-feeder` — already has DNS via the existing `adsb` reservation at 10.0.2.141 ## Test plan - [x] `python3 -c "import yaml; yaml.safe_load(open('netbox/seed-data/objects.yaml'))"` passes - [x] `python3 -c "import yaml; yaml.safe_load(open('ansible/roles/kea/defaults/main.yml'))"` passes - [ ] CI lint workflow green - [ ] CI `ansible-check` workflow green - [ ] After merge, `netbox-seed.yml` workflow runs idempotently against live NetBox; 14 new IPAM + 13 new DNS records appear - [ ] After merge, `ansible-apply` reloads Kea on both nodes (`changed=2`) and `kea-dhcp4 -t` validation passes - [ ] `dig @10.0.2.230 git.infra.strscrm.io` returns `10.0.2.146` (and similar spot-check for at least one other new record) - [ ] git/forgejo-runner/patchmon CTs keep their current IPs through next DHCP renewal (Kea reservation honoured) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(seed): add 14 NetBox A records + 3 Kea reservations for homelab services
Some checks failed
ansible-check / check (pull_request) Successful in 4m33s
lint / lint (pull_request) Failing after 1m11s
7417f8aa39
Discovered via scripts/discover-undns-vms.py against the live Proxmox
cluster after VLAN 102 cutover settled. The script also gained a small
fix to read CT runtime IPs (the same source the PVE GUI uses) instead
of just the static lxc config.

Added (all under infra.strscrm.io):

  Static IPs (configured on the host directly, status=active)
    pegaprox     10.0.2.3   (Pegapox PVE automation)
    authelia     10.0.2.5
    tunnel       10.0.2.6
    pbs          10.0.2.40  (Proxmox Backup Server)
    ttrss        10.0.2.105

  DHCP-assigned IPs on Kea (status=dhcp)
    frigate          10.0.2.9
    pulse            10.0.2.12
    unpoller         10.0.2.13
    apt-cacher-ng    10.0.2.15
    kuma             10.0.2.16

  Dynamic CTs pinned to current Kea lease (status=dhcp + reservation)
    git              10.0.2.146  (MAC bc:24:11:29:17:15)
    forgejo-runner   10.0.2.147  (MAC bc:24:11:d2:55:02)
    patchmon         10.0.2.148  (MAC bc:24:11:74:11:d5)

The three reservations are added to both `netbox/seed-data/objects.yaml`
and `ansible/roles/kea/defaults/main.yml` (the live source of truth for
Kea config). Each pin uses the MAC the CT already has and the IP it's
already on, so the cutover from "dynamic in pool" to "fixed reservation"
is a no-op for the running guest.

Skipped per operator: pdm (about to delete), dns-01 / dns-02 (will
decom in 14 days), rhel (offline). adsb-feeder VM already has DNS via
the existing `adsb` reservation at 10.0.2.141 — no new entry needed.
chore(yamllint): allow extra spaces after commas in inline-flow records
Some checks failed
ansible-check / check (pull_request) Successful in 4m30s
lint / lint (pull_request) Failing after 2m6s
df65864e4b
The codebase aligns inline-flow records (kea_reservations entries,
seed-data dns_records, monitor `loop:` items) by padding extra spaces
after commas so columns line up. yamllint's default `commas` rule
caps that at one space and was failing CI on every existing alignment
block.

Loosen the rule to require >=1 space after a comma, no upper bound.
The min-spaces-after: 1 floor still catches genuinely missing
whitespace; max-spaces-before: 0 still catches `foo , bar` mistakes.

No content changes — purely a lint-policy tweak for an aesthetic the
project has used since seed-data first landed.
fix(lint): unblock ansible-lint on PR — naming, refactor, config skips
All checks were successful
ansible-check / check (pull_request) Successful in 4m30s
lint / lint (pull_request) Successful in 2m5s
6165a226f0
ansible-lint embeds yamllint with its own evaluation path, so the
.yamllint policy doesn't propagate. Three classes of fix:

1. Real code-quality fixes:
   - playbooks/kea-render-prod.yml: name the play and the template
     task (name[play] / name[missing]).
   - roles/monitor/tasks/main.yml: refactor the orphan-dashboard
     removal step. The previous `loop:` was a 234-char single-line
     expression that double-substituted `{{ monitor_install_dir }}`
     inside a regex_replace argument (jinja[spacing] warning + line
     length). Split into two `set_fact` steps that compute the
     orphan list cleanly, then loop over a short list.

2. Lint policy:
   - .ansible-lint skip_list grows by yaml[commas] and
     yaml[line-length] to mirror .yamllint (which already disables
     these). Inline-flow records align fields by padding extra
     spaces after commas; long URLs in get_url tasks naturally
     exceed 160 chars. Both are pre-existing patterns across the
     codebase, not new debt.

ansible-lint now passes with 0 failures / 0 warnings on the basic
profile (also clean against production).
Merge branch 'main' into feature/seed-additional-dns
Some checks failed
ansible-check / check (pull_request) Failing after 2m51s
lint / lint (pull_request) Successful in 2m7s
e69d713d9d
Commenting is not possible because the repository is archived.
No reviewers
No labels
drift
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gosseljl/homelab-ddi!5
No description provided.