Newer Older
218 lines | 5.707kb
Bogdan Timofte authored 2 weeks ago
1
# Local Organization SSH Inventory
2
#
3
# This file extends or replaces the nextgen inventory for local development,
4
# testing, and lab environments.
5
#
6
# Template structure follows nextgen/hosts.yaml for consistency.
7

            
8
version: 1
9

            
10
facts:
11
  environment: local
12
  organization: xdev
13
  jump_default_port: 22
14
  jump_default_user: bogdan
15
  notes:
16
    - Local lab and development infrastructure
17
    - Uses SSH key-based auth on all machines
18
    - is-jumper is the local entry point
19

            
20
ssh_options:
21
  local_defaults:
Bogdan Timofte authored 2 weeks ago
22
    description: Local SSH compatibility options (no legacy algorithms needed)
Bogdan Timofte authored 2 weeks ago
23
    options:
24
      ForwardAgent: yes
25
      ForwardX11: no
26
      PasswordAuthentication: no
27
      HostbasedAuthentication: no
28
      CheckHostIP: yes
29
      StrictHostKeyChecking: accept-new
30
      Tunnel: no
31
      HashKnownHosts: yes
32

            
33
defaults:
34
  jump:
35
    user: bogdan
36
    port: 22
37
  final_host:
38
    user: bogdan
39
    port: 22
40
    connect_timeout: 5
41
    connection_attempts: 1
42

            
43
entrypoints:
44
  is_jumper:
45
    aliases: [is-jumper, 192.168.2.100]
46
    hostname: 192.168.2.100
47
    user: root
48
    identity_file: ~/.ssh/keys/is-jumper_ed25519
49
    identities_only: true
50

            
51
jumps:
52
  j1:
53
    aliases: [j1, j1-local]
54
    hostname: 10.253.51.50
Bogdan Timofte authored 2 weeks ago
55
    user: bogdan.timofte
Bogdan Timofte authored 2 weeks ago
56
    port: 25904
57
    role: primary
Bogdan Timofte authored 2 weeks ago
58
    proxy_jump: is-jumper
Bogdan Timofte authored 2 weeks ago
59
  j2:
60
    aliases: [j2, j2-local]
61
    hostname: 10.253.51.52
Bogdan Timofte authored 2 weeks ago
62
    user: bogdan.timofte
Bogdan Timofte authored 2 weeks ago
63
    port: 25904
64
    role: failover
65

            
66
groups:
67
  local_lab:
68
    description: Local lab and testing machines
69
    hosts:
70
      lab_vm1:
71
        aliases: [lab-vm1, lab1, 192.168.2.110]
72
        hostname: 192.168.2.110
73
        user: bogdan
74
      lab_vm2:
75
        aliases: [lab-vm2, lab2, 192.168.2.111]
76
        hostname: 192.168.2.111
77
        user: bogdan
78
      lab_vm3:
79
        aliases: [lab-vm3, lab3, 192.168.2.112]
80
        hostname: 192.168.2.112
81
        user: bogdan
82
      lab_router:
83
        aliases: [lab-router, router, 192.168.2.1]
84
        hostname: 192.168.2.1
85
        user: admin
86
      lab_switch:
87
        aliases: [lab-switch, switch, 192.168.2.2]
88
        hostname: 192.168.2.2
89
        user: admin
90

            
91
  local_servers:
92
    description: Local production/staging servers
93
    hosts:
94
      local_nexgen:
95
        aliases: [local-nextgen, nextgen-local, 192.168.2.103]
96
        hostname: 192.168.2.103
97
        user: bogdan
98
      local_backup:
99
        aliases: [local-backup, backup, 192.168.2.105]
100
        hostname: 192.168.2.105
101
        user: bogdan
102
      local_mgmt:
103
        aliases: [local-mgmt, mgmt, management, 192.168.2.104]
104
        hostname: 192.168.2.104
105
        user: bogdan
106
      local_mon:
107
        aliases: [local-mon, monitoring, zabbix, 192.168.2.106]
108
        hostname: 192.168.2.106
109
        user: bogdan
110

            
111
  development:
112
    description: Development and build machines
113
    hosts:
114
      dev_build:
115
        aliases: [dev-build, builder, 192.168.2.120]
116
        hostname: 192.168.2.120
117
        user: bogdan
118
      dev_test:
119
        aliases: [dev-test, tester, 192.168.2.121]
120
        hostname: 192.168.2.121
121
        user: bogdan
122
      dev_docs:
123
        aliases: [dev-docs, documentation, 192.168.2.122]
124
        hostname: 192.168.2.122
125
        user: bogdan
126

            
127
  reference_infrastructure:
128
    description: Reference to company infrastructure (for testing routing)
129
    default_jump: j1
130
    hosts:
131
      ref_pbx_bo:
132
        aliases: [ref-pbx-bo, pbx-bo, 10.253.51.135]
133
        hostname: 10.253.51.135
134
        user: bogdan
135
      ref_porta_db:
136
        aliases: [ref-porta-db, porta-db, 193.16.148.11]
137
        hostname: 193.16.148.11
138
        user: bogdan
139
      ref_sbc0:
140
        aliases: [ref-sbc0, sbc0, 10.253.51.130]
141
        hostname: 10.253.51.130
142
        user: bogdan
143
      ref_sbc1:
144
        aliases: [ref-sbc1, sbc1, 10.253.51.131]
145
        hostname: 10.253.51.131
146
        user: bogdan
147

            
148
  legacy_infrastructure:
Bogdan Timofte authored 2 weeks ago
149
    description: Legacy xdev.ro and mondo-byte.ro historical servers (local direct access)
150
    defaults:
151
      route: local
Bogdan Timofte authored 2 weeks ago
152
    hosts:
Bogdan Timofte authored 2 weeks ago
153
      # xdev.ro hosts - entry point
Bogdan Timofte authored 2 weeks ago
154
      is_jumper:
155
        aliases: [is-jumper, is-vpn-gw]
156
        hostname: 192.168.2.100
157
        user: root
Bogdan Timofte authored 2 weeks ago
158
        proxy_jump: none
Bogdan Timofte authored 2 weeks ago
159
        identity_file: ~/.ssh/keys/is-jumper_ed25519
160
        identities_only: true
Bogdan Timofte authored 2 weeks ago
161
      # xdev.ro local network hosts (accessed via is-jumper)
Bogdan Timofte authored 2 weeks ago
162
      is_mazeri:
163
        aliases: [is-mazeri]
164
        hostname: 192.168.2.102
165
        user: root
166
      is_toltec:
167
        aliases: [is-toltec]
168
        hostname: 192.168.2.103
169
        user: root
170
      is_baobab:
171
        aliases: [is-baobab]
172
        hostname: 192.168.2.91
173
        user: root
174
      is_ebony:
175
        aliases: [is-ebony]
176
        hostname: 192.168.2.92
177
        user: root
178
      is_tapia:
179
        aliases: [is-tapia]
180
        hostname: 192.168.2.93
181
        user: root
182
      is_anjohibe:
183
        aliases: [is-anjohibe]
184
        hostname: 192.168.2.95
185
        user: root
186
      is_andrafiabe:
187
        aliases: [is-andrafiabe]
188
        hostname: 192.168.2.96
189
        user: root
190
      is_mat:
191
        aliases: [is-mat]
192
        hostname: 192.168.2.133
193
        user: root
194
      is_nasturel:
195
        aliases: [is-nasturel]
196
        hostname: 192.168.2.144
197
        user: sshd
Bogdan Timofte authored 2 weeks ago
198
      # mondo-byte.ro hosts (accessed via is-jumper)
Bogdan Timofte authored 2 weeks ago
199
      mt_rabit:
200
        aliases: [mt-rabit]
201
        hostname: 89.32.216.4
202
        user: root
203
      mt_xpider:
204
        aliases: [mt-xpider]
205
        hostname: 89.32.216.5
206
        user: root
207

            
208
access_policies:
209
  rules:
210
    - description: All local hosts use direct SSH (no jump)
211
      scope: group:local_lab,local_servers,development,legacy_infrastructure
212
      access: direct
213

            
214
    - description: Reference hosts route through J1 jump
215
      scope: group:reference_infrastructure
216
      access: via_jump
217
      jump_host: j1
218
      auth_method: key