remove hosts/ directory — single source of truth is inventory.yaml
- 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
This commit is contained in:
@@ -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 <<EOF
|
||||
[bootstrap] no hosts/$HNAME.yaml in the repo.
|
||||
[bootstrap] no entry for '$HNAME' in inventory.yaml.
|
||||
This client has not been enrolled yet. From any existing client, run:
|
||||
|
||||
homelab client add $HNAME
|
||||
@@ -669,7 +669,7 @@ cat <<EOF
|
||||
|
||||
[bootstrap] done.
|
||||
|
||||
Identity: $CLONE_DIR/hosts/$HNAME.yaml
|
||||
Identity: $CLONE_DIR/inventory.yaml
|
||||
Sync: 5-minute interval ($([ "$OS" = "Darwin" ] && echo launchd || echo systemd))
|
||||
Manual pull: homelab sync (or 'systemctl start homelab-context-sync' / 'launchctl kickstart')
|
||||
CLI: /usr/local/bin/homelab (try 'homelab whoami')
|
||||
|
||||
Reference in New Issue
Block a user