From 5009a335bb643999e29edab4831570831e15a691 Mon Sep 17 00:00:00 2001 From: dtoro Date: Tue, 7 Jul 2026 20:48:51 +0200 Subject: [PATCH] =?UTF-8?q?remove=20hosts/=20directory=20=E2=80=94=20singl?= =?UTF-8?q?e=20source=20of=20truth=20is=20inventory.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Delete cmd/oikos/build_hosts.go (generator no longer needed) - Remove build-hosts subcommand from main.go - Fix oikos homelab whoami: read from inventory.yaml instead of hosts/ - Update bootstrap.sh: identity check uses inventory.yaml - Remove all 27 generated hosts/*.yaml files - Update AGENTS.md and OIKOS.md to reference inventory.yaml only --- .agents/OIKOS.md | 2 +- AGENTS.md | 4 +- bootstrap.sh | 8 +- cmd/oikos/build_hosts.go | 187 ------------------------------------- cmd/oikos/homelab.go | 23 +++-- cmd/oikos/main.go | 6 -- hosts/apps.yaml | 59 ------------ hosts/arriman.yaml | 34 ------- hosts/auth-outpost.yaml | 20 ---- hosts/caddy.yaml | 34 ------- hosts/dns.yaml | 29 ------ hosts/elementsynapse.yaml | 31 ------ hosts/gitea.yaml | 36 ------- hosts/grimmory.yaml | 25 ----- hosts/haos.yaml | 27 ------ hosts/house.yaml | 25 ----- hosts/hubris.yaml | 36 ------- hosts/jellyfin.yaml | 38 -------- hosts/mac-mini.yaml | 24 ----- hosts/mule-images.yaml | 32 ------- hosts/netbird-vps.yaml | 35 ------- hosts/nextcloud.yaml | 31 ------ hosts/nfs-export.yaml | 18 ---- hosts/paperless.yaml | 32 ------- hosts/rclone.yaml | 19 ---- hosts/republic-laptop.yaml | 20 ---- hosts/romm.yaml | 26 ------ hosts/seanime.yaml | 29 ------ hosts/sophia.yaml | 23 ----- hosts/strong.yaml | 24 ----- hosts/teddycloud.yaml | 35 ------- hosts/trmnl.yaml | 28 ------ hosts/zimaos.yaml | 26 ------ 33 files changed, 23 insertions(+), 1003 deletions(-) delete mode 100644 cmd/oikos/build_hosts.go delete mode 100644 hosts/apps.yaml delete mode 100644 hosts/arriman.yaml delete mode 100644 hosts/auth-outpost.yaml delete mode 100644 hosts/caddy.yaml delete mode 100644 hosts/dns.yaml delete mode 100644 hosts/elementsynapse.yaml delete mode 100644 hosts/gitea.yaml delete mode 100644 hosts/grimmory.yaml delete mode 100644 hosts/haos.yaml delete mode 100644 hosts/house.yaml delete mode 100644 hosts/hubris.yaml delete mode 100644 hosts/jellyfin.yaml delete mode 100644 hosts/mac-mini.yaml delete mode 100644 hosts/mule-images.yaml delete mode 100644 hosts/netbird-vps.yaml delete mode 100644 hosts/nextcloud.yaml delete mode 100644 hosts/nfs-export.yaml delete mode 100644 hosts/paperless.yaml delete mode 100644 hosts/rclone.yaml delete mode 100644 hosts/republic-laptop.yaml delete mode 100644 hosts/romm.yaml delete mode 100644 hosts/seanime.yaml delete mode 100644 hosts/sophia.yaml delete mode 100644 hosts/strong.yaml delete mode 100644 hosts/teddycloud.yaml delete mode 100644 hosts/trmnl.yaml delete mode 100644 hosts/zimaos.yaml diff --git a/.agents/OIKOS.md b/.agents/OIKOS.md index 8ec9c70..0ae80d1 100644 --- a/.agents/OIKOS.md +++ b/.agents/OIKOS.md @@ -38,7 +38,7 @@ one pass through **Observe → Orient → Decide → Act**: | Primitive | What it is | Lives in | |---|---|---| -| Host / Service | topology entities | `inventory.yaml` (+ generated `hosts/*.yaml`) | +| Host / Service | topology entities | `inventory.yaml` | | Secret | SOPS+age encrypted value, per-client recipients | `secrets/` + `.sops.yaml` | | Runbook | executable workflow with risk class + verification | `.agents/skills//SKILL.md` | | Signal | something needing attention, with lifecycle | `signals/` ledger (Week 3) | diff --git a/AGENTS.md b/AGENTS.md index 6ad008b..add2974 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,13 +16,13 @@ Agent-facing instruction is separated from human content under `.agents/`: `.agents/domains/` holds the per-domain schemas ([knowledge](.agents/domains/knowledge/schema.md), [operations](.agents/domains/operations/schema.md)). The narrative wiki lives under `knowledge/wiki/`; the machine-readable substrate -(`inventory.yaml`, `hosts/*.yaml`, `oikos/`) stays at the repo root. +(`inventory.yaml` stays at the repo root. ## 1. Who you are Run `hostname` (Linux) or `scutil --get LocalHostName` (macOS), then read: - /opt/homelab-context/hosts/.yaml + /opt/homelab-context/inventory.yaml That file tells you your role, your peers, what's mounted, and what services you host. If it does not exist, this client was not enrolled — stop and tell diff --git a/bootstrap.sh b/bootstrap.sh index 4431c4f..1a00637 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -314,10 +314,10 @@ else fi # -------- identity check -------- -HOST_YAML="$CLONE_DIR/hosts/$HNAME.yaml" -if [ ! -f "$HOST_YAML" ]; then +INVENTORY="$CLONE_DIR/inventory.yaml" +if [ ! -f "$INVENTORY" ] || ! grep -q "^ $HNAME:" "$INVENTORY" 2>/dev/null; then cat >&2 <