Showing 1 changed files with 65 additions and 0 deletions
+65 -0
README.md
@@ -50,6 +50,71 @@ user bogdan.timofte
50 50
 p12.voip.ro
51 51
 ```
52 52
 
53
+## Sources of Truth
54
+
55
+There are two separate host tables, with separate ownership:
56
+
57
+| Table | File / Location | Owner | What Belongs There |
58
+| --- | --- | --- | --- |
59
+| Local table | `inventory/hosts-local.yaml` in this repo | Us / Bogdan local workstation | Local lab hosts, local defaults, local key paths, and local overrides required for this Mac |
60
+| NextGen table | `nextgen@192.168.2.103:/home/nextgen/projects/ssh-infrastructure/inventory/hosts.yaml` | NextGen / upstream | Company-managed NextGen host list: porta, pbx, radius, voip, network gear, and upstream defaults |
61
+
62
+Operational rule:
63
+
64
+```text
65
+inventory/hosts-local.yaml is our local source of truth.
66
+inventory/hosts.yaml is a local copy of the NextGen upstream table.
67
+```
68
+
69
+Do not put local-only fixes into the upstream table unless they are true for
70
+NextGen as well. Keep Mac/local requirements in `inventory/hosts-local.yaml`.
71
+
72
+The effective local config is generated from both files:
73
+
74
+```text
75
+inventory/hosts.yaml        <- copied/synced from nextgen upstream
76
+inventory/hosts-local.yaml  <- maintained locally by us
77
+  -> tools/generate-configs.py
78
+  -> generated/client.conf
79
+  -> ~/.ssh/config
80
+```
81
+
82
+Critical local overrides currently required:
83
+
84
+```yaml
85
+entrypoints:
86
+  is_jumper:
87
+    identity_file: ~/.ssh/keys/is-jumper_ed25519
88
+    identities_only: true
89
+
90
+jumps:
91
+  j1:
92
+    user: bogdan.timofte
93
+  j2:
94
+    user: bogdan.timofte
95
+```
96
+
97
+The sync script updates only the local copy of the upstream table:
98
+
99
+```bash
100
+tools/sync-hosts-from-upstream.sh
101
+```
102
+
103
+After every sync, verify the local overlay still produces the right effective
104
+config:
105
+
106
+```bash
107
+ssh -G j1 | grep -E '^(hostname|user|port) '
108
+ssh -G is-jumper | grep -E '^(hostname|user|identityfile|identitiesonly) '
109
+```
110
+
111
+Expected:
112
+
113
+```text
114
+user bogdan.timofte
115
+identityfile ~/.ssh/keys/is-jumper_ed25519
116
+```
117
+
53 118
 ## Repository Rules
54 119
 
55 120
 Project source: