-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheducation.yml
456 lines (409 loc) · 11.9 KB
/
education.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
<<<<<<< HEAD
---
# This is a template for a typical edu deployment that includes the initial
# configuration of an rXg. It can then be configured as a standalone rXg,
# or a cluster member.
# A typical edu deployment consists of an rXg connected to LDAP for identity
# management. And contains the required identity groups, networks,
# policies, vlans, and portals.
#Networks
# Staff
# Internal
# BYOD
# Students
# Internal
# BYOD
# Infrastructure/Management
# IOT
#Policies
# Staff
# Internal
# BYOD
# Students
# Internal
# BYOD
# Infrastructure/Management
# IOT
#######################################################################################
# The following section contains the variables used in the template. You can modify #
# them in this section and see them reused later between '<%=' and '%>'tags. #
# Since these templates are erb based you do have the option to use inline ruby. #
#######################################################################################
<%
#System settings
fqdn ||= 'rxg.example.com'
time_zone ||= 'America/Chicago'
ntp_server ||= '10.123.1.2'
#Networking variables
networks ||= ['Staff-Internal', 'Staff-BYOD', 'Students-Internal', 'Students-BYOD', 'Infrastructure/Management', 'IOT']
vlans ||= ['1100', '1200', '1300', '1400', '1500', '1600']
domain ||= 'example.com'
dns_servers||= '10.87.53.1,10.87.53.2'
#WAN Settings
wan_interface ||= 'vmx0'
#LAN interface
lan_interface ||= 'vmx1'
# LDAP Variables
ldap_domain ||= 'example.com'
dc1 ||= 'com'
dc2 ||= 'example'
username_attribute ||= 'userprincipalname'
ldap_domain_servers ||= ['Active Directory A', 'Active Directory B']
ldap_domain_servers_ip ||= ['10.89.1.1', '10.89.1.2']
%>
##################################################################################
# This is the template section, it leverages variables specified above. #
# You can override the values and add/remove sections per your needs #
##################################################################################
# Enable LLDP on LAN and WAN Interfaces
- LadvdOption:
- name: default
active: true
auto_enable_protocols: true
listen_only: false
interfaces:
- <%= lan_interface %>
- <%= wan_interface %>
# Create all VLANs and apply to LAN interface
- Vlan:
<% networks.zip(vlans).each do |network, vlan| %>
- name: <%= network %>
interface: <%= lan_interface %>
tag: <%= vlan %>
autoincrement_ratio: 1
autoincrement_mode: address
<% end %>
# Apply IP addresses to VLANs
- Address:
<% networks.each_with_index do |network, index| %>
- name: <%= network %>
vlan: <%= network %>
span: 1
autoincrement: 4
cidr: 10.<%= index+1 %>.0.1/24
<% end %>
# Create DHCP Pools for subnets
- DhcpPool:
<% networks.each_with_index do |network, index| %>
- name: <%= network %>
start_ip: 10.<%= index+1 %>.0.2
end_ip: 10.<%= index+1 %>.0.254
start_reserved: 0
end_reserved: 0
router_host_nth: 0
<% end %>
# Define DHCP options
- DhcpOption:
- name: <%= domain %>
option_name: domain-name
option_value: <%= domain %>
- name: Internal DNS Servers
option_name: domain-name-servers
option_value: <%= dns_servers %>
# Create IP Groups for subnets
- IpGroup:
<% networks.each_with_index do |network, index| %>
- name: <%= network %>
priority: <%= index+1 %>
addresses:
- <%= network %>
policy: <%= network %>
<% end %>
# LDAP
- Ldap_domains:
- name: <%= ldap_domain %>
active_directory_binding: true
domain: <%= ldap_domain %>
users_context: DC=<%= dc2 %>,DC=<%= dc1 %>
username_attribute: <%= username_attribute %>
create_account: true
join_domain: true
ldap_domain_servers:
<% ldap_domain_servers.zip(ldap_domain_servers_ip).each.with_index(1) do |(server, ip), index| %>
- name: <%= server %>
priority: <%= index %>
host: <%= ip %>
port: 389
timeout: 15
tries: 1
<% end %>
# Create the required policies based on the networks list and remove the Default policy
- Policy:
<% networks.each do |network| %>
- name: <%= network %>
<% end %>
- name: Default
default: true
# Create Radius Server
- RadiusServerOption:
- name: Default
active: true
auth_port: 1812
acct_port: 1813
secret: lJCCtI9qMfDe_6R1OLGdXg
radsec_port: 2083
debug_level: normal
min_tls_version: '1.2'
max_tls_version: '1.2'
policies:
- Management
# Shared Credential Group for internal devices
- SharedCredentialGroup:
- name: Internal Devices
policy: Internal Devices
priority: 5
credential: IT_Department
min_mac_login_period: 0
unlimited_usage_minutes: true
unlimited_usage_mb_up: true
unlimited_usage_mb_down: true
max_simultaneous_sessions: 20
starts_at: !ruby/object:ActiveSupport::TimeWithZone
utc: 2022-10-11 05:00:00.000000000 Z
zone: &1 !ruby/object:ActiveSupport::TimeZone
name: America/Chicago
time: 2022-10-11 00:00:00.000000000 Z
ends_at: !ruby/object:ActiveSupport::TimeWithZone
utc: 2032-10-31 05:00:00.000000000 Z
zone: *1
time: 2032-10-31 00:00:00.000000000 Z
state: active
mon: true
tues: true
wed: true
thurs: true
fri: true
sat: true
sun: true
recurring_method: none
automatic_login: true
# Create Captive Portal for Splash and Landing
- CaptivePortal:
- name: Default Splash
portal_name: default
background_automatic_login: mac
portal_automatic_login: mac_or_cookie
password_reset_method: secret_question
role_attribute: none
shared_credential_groups:
- Internal Devices
ldap_domains:
- <%= ldap_domain %>
policies:
- Default
- LandingPortal:
- name: Default Landing
portal_name: default
unlimited_session_minutes: true
idle_minutes: 20
session_grace_minutes: 15
portal_automatic_login: mac_or_cookie
background_automatic_login: mac
policies:
- Internal Devices
=======
---
# This is atemplate for K-12 deployments that includes the initial
# configuration of an rXg. It can then be configured as a standalone rXg,
# or a cluster member.
# A typical K-12 deployment consists of an rXg connected to LDAP for identity
# management. And contains the required identity groups, networks,
# policies, vlans, and portals.
#Networks
# Staff
# Internal
# BYOD
# Students
# Internal
# BYOD
# Infrastructure/Management
# IOT
#Policies
# Staff
# Internal
# BYOD
# Students
# Internal
# BYOD
# Infrastructure/Management
# IOT
#Portals
# TODO
#######################################################################################
# The following section contains the variables used in the template. You can modify #
# them in this section and see them reused later between '<%=' and '%>'tags. #
# Since these templates are erb based you do have the option to use inline ruby. #
#######################################################################################
<%
#System settings
fqdn ||= 'rxg.example.com'
time_zone ||= 'America/Chicago'
ntp_server ||= '10.123.1.2'
#Networking variables
networks ||= ['Staff-Internal', 'Staff-BYOD', 'Students-Internal', 'Students-BYOD', 'Infrastructure/Management', 'IOT']
vlans ||= ['1100', '1200', '1300', '1400', '1500', '1600']
domain ||= 'example.com'
dns_servers||= '10.87.53.1,10.87.53.2'
#WAN Settings
wan_interface ||= 'vmx0'
#LAN interface
lan_interface ||= 'vmx1'
# LDAP Variables
ldap_domain ||= 'example.com'
dc1 ||= 'com'
dc2 ||= 'example'
username_attribute ||= 'userprincipalname'
ldap_domain_servers ||= ['Active Directory A', 'Active Directory B']
ldap_domain_servers_ip ||= ['10.89.1.1', '10.89.1.2']
%>
##################################################################################
# This is the template section, it leverages variables specified above. #
# You can override the values and add/remove sections per your needs #
##################################################################################
# Enable LLDP on LAN and WAN Interfaces
- LadvdOption:
- name: default
active: true
auto_enable_protocols: true
listen_only: false
interfaces:
- <%= lan_interface %>
- <%= wan_interface %>
# Create all VLANs and apply to LAN interface
- Vlan:
<% networks.zip(vlans).each do |network, vlan| %>
- name: <%= network %>
interface: <%= lan_interface %>
tag: <%= vlan %>
autoincrement_ratio: 1
autoincrement_mode: address
<% end %>
# Apply IP addresses to VLANs
- Address:
<% networks.each_with_index do |network, index| %>
- name: <%= network %>
vlan: <%= network %>
span: 1
autoincrement: 4
cidr: 10.<%= index+1 %>.0.1/24
<% end %>
# Create DHCP Pools for subnets
- DhcpPool:
<% networks.each_with_index do |network, index| %>
- name: <%= network %>
start_ip: 10.<%= index+1 %>.0.2
end_ip: 10.<%= index+1 %>.0.254
start_reserved: 0
end_reserved: 0
router_host_nth: 0
<% end %>
# Define DHCP options
- DhcpOption:
- name: <%= domain %>
option_name: domain-name
option_value: <%= domain %>
- name: Internal DNS Servers
option_name: domain-name-servers
option_value: <%= dns_servers %>
# Create IP Groups for subnets
- IpGroup:
<% networks.each_with_index do |network, index| %>
- name: <%= network %>
priority: <%= index+1 %>
addresses:
- <%= network %>
policy: <%= network %>
<% end %>
# LDAP
- Ldap_domains:
- name: <%= ldap_domain %>
active_directory_binding: true
domain: <%= ldap_domain %>
users_context: DC=<%= dc2 %>,DC=<%= dc1 %>
username_attribute: <%= username_attribute %>
create_account: true
join_domain: true
ldap_domain_servers:
<% ldap_domain_servers.zip(ldap_domain_servers_ip).each.with_index(1) do |(server, ip), index| %>
- name: <%= server %>
priority: <%= index %>
host: <%= ip %>
port: 389
timeout: 15
tries: 1
<% end %>
# Create the required policies based on the networks list and remove the Default policy
- Policy:
<% networks.each do |network| %>
- name: <%= network %>
<% end %>
- name: Default
default: true
# Create Radius Server
- RadiusServerOption:
- name: Default
active: true
auth_port: 1812
acct_port: 1813
secret: lJCCtI9qMfDe_6R1OLGdXg
radsec_port: 2083
debug_level: normal
min_tls_version: '1.2'
max_tls_version: '1.2'
policies:
- Management
# Shared Credential Group for internal devices
- SharedCredentialGroup:
- name: Internal Devices
policy: Internal Devices
priority: 5
credential: IT_Department
min_mac_login_period: 0
unlimited_usage_minutes: true
unlimited_usage_mb_up: true
unlimited_usage_mb_down: true
max_simultaneous_sessions: 20
starts_at: !ruby/object:ActiveSupport::TimeWithZone
utc: 2022-10-11 05:00:00.000000000 Z
zone: &1 !ruby/object:ActiveSupport::TimeZone
name: America/Chicago
time: 2022-10-11 00:00:00.000000000 Z
ends_at: !ruby/object:ActiveSupport::TimeWithZone
utc: 2032-10-31 05:00:00.000000000 Z
zone: *1
time: 2032-10-31 00:00:00.000000000 Z
state: active
mon: true
tues: true
wed: true
thurs: true
fri: true
sat: true
sun: true
recurring_method: none
automatic_login: true
# Create Captive Portal for Splash and Landing
- CaptivePortal:
- name: Default Splash
portal_name: default
background_automatic_login: mac
portal_automatic_login: mac_or_cookie
password_reset_method: secret_question
role_attribute: none
shared_credential_groups:
- Internal Devices
ldap_domains:
- <%= ldap_domain %>
policies:
- Default
- LandingPortal:
- name: Default Landing
portal_name: default
unlimited_session_minutes: true
idle_minutes: 20
session_grace_minutes: 15
portal_automatic_login: mac_or_cookie
background_automatic_login: mac
policies:
- Internal Devices
>>>>>>> 477c0a1b043ec0ffd0cf97e607e44b0a56134fbf