-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathinventory_spine_leaf.yml
173 lines (173 loc) · 8.96 KB
/
inventory_spine_leaf.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
##########################
# Aruba DCN Workflows
# Example Inventory
##########################
all:
children: # Defining High Level Groups
aoscx_switches: # Group for all necessary Ansible connection CX variables
vars:
ansible_user: admin # switch login user - used by aoscx Collection
ansible_password: admin # switch login password - used by aoscx Collection
ansible_connection: arubanetworks.aoscx.aoscx # DO NOT CHANGE
ansible_network_os: arubanetworks.aoscx.aoscx # DO NOT CHANGE
ansible_httpapi_use_ssl: True # DO NOT CHANGE
ansible_httpapi_validate_certs: False # Will change depending on your environment
ansible_acx_no_proxy: True # REMOVE
ansible_aoscx_validate_certs: False
ansible_aoscx_use_proxy: False
children:
Zone1: # Group for common variables within a specific DC Zone/Pod
vars:
hostname: "{{inventory_hostname}}" # hostname of the device is set to the device's inventory name
config_path: "configs/" # Destination directory for generated switch configurations
ospf_area: 0.0.0.0 # iBGP only, not necessary for eBGP fabric
asn: 65101 # for eBGP this is used for the Spine BGP ASN, for iBGP this is the BGP ASN for the entire DC Zone/Pod
mtu: 9198
# Loopback0 IPs of each spine, used to populate BGP neighbors for Leafs
spine_loopback0_ips:
- '192.168.1.11' # Must match loopback IP of Spine1
- '192.168.1.12' # Must match loopback IP of Spine2
server_vlans: [11] # VLANs to be created on leafs for server traffic
# VSX information
vsx_keepalive_int: 1/1/31
vsx_isl_ports: ['1/1/32']
vsx_isl_lagid: 1
children:
leaf:
# Leafs devices are grouped by VSX pairs,
# names of vsx_pairs can be anything alphanumeric
# devices do not have to be physically in the same "vsx_pair"
# Rack information such as loopback0_ip and vsx_pair_asn must be repeated in
# spine group - see below
children:
rack1:
vars:
# eBGP only, not necessary for iBGP fabric
vsx_pair_asn: 65001
# eBGP only, Used to create BGP neighbors to Spines, must match IP addresses of the Spine interfaces connecting to the Leafs
spine_L3fabric_ips:
- 192.168.2.1
- 192.168.2.3
- 192.168.2.5
- 192.168.2.7
# VSX information
vsx_system_mac: 00:00:00:00:01:11
vsx_keepalive_ip_primary: 192.168.1.110
vsx_keepalive_ip_secondary: 192.168.1.111
hosts:
Zone1-Rack1-Leaf1a:
ansible_host: 10.10.10.56
vsx_role: primary
loopback0_ip: 192.168.1.1
loopback1_ip: 192.168.100.1
# L3 interfaces - Leaf uplinks to Spines
vsx_pair_L3fabric_ips:
- interface: 1/1/49
ipv4: 192.168.2.0
- interface: 1/1/50
ipv4: 192.168.2.2
Zone1-Rack1-Leaf1b:
ansible_host: 10.10.10.57
vsx_role: secondary
loopback0_ip: 192.168.1.2
loopback1_ip: 192.168.100.2
# L3 interfaces - Leaf uplinks to Spines
vsx_pair_L3fabric_ips:
- interface: 1/1/49
ipv4: 192.168.2.4
- interface: 1/1/50
ipv4: 192.168.2.6
rack3:
vars:
vsx_pair_asn: 65003
vsx_system_mac: 00:00:00:00:03:13
vsx_keepalive_ip_primary: 192.168.1.112
vsx_keepalive_ip_secondary: 192.168.1.113
spine_L3fabric_ips:
- 192.168.2.9
- 192.168.2.11
- 192.168.2.13
- 192.168.2.15
hosts:
Zone1-Rack3-Leaf3a:
ansible_host: 10.10.10.60
vsx_role: primary
loopback0_ip: 192.168.1.5
loopback1_ip: 192.168.100.5
# L3 interfaces for fabric - Leaf uplinks to Spines
vsx_pair_L3fabric_ips:
- interface: 1/1/49
ipv4: 192.168.2.8
- interface: 1/1/50
ipv4: 192.168.2.10
Zone1-Rack3-Leaf3b:
ansible_host: 10.10.10.61
vsx_role: secondary
loopback0_ip: 192.168.1.6
loopback1_ip: 192.168.100.6
# L3 interfaces for fabric - Leaf uplinks to Spines
vsx_pair_L3fabric_ips:
- interface: 1/1/49
ipv4: 192.168.2.12
- interface: 1/1/50
ipv4: 192.168.2.14
vars:
config_template: leaf.j2
speed_interface_group_10g: [1,3] # Enables 10g speed on specified interface groups, remove variable if unused
spine:
vars:
config_template: spine.j2
vsx_system_mac: 00:00:00:00:01:01
# Rack data structure used in playbooks
vsx_pairs:
- vsx_pair_asn: 65001
loopback_ips: ['192.168.1.1', '192.168.1.2'] # Must match loopback0_ips of corresponding vsx_pair above in leaf group
- vsx_pair_asn: 65003
loopback_ips: ['192.168.1.5', '192.168.1.6'] # Must match loopback0_ips of corresponding vsx_pair above in leaf group
hosts:
Zone1-Spine1:
ansible_host: 10.10.10.54
loopback0_ip: 192.168.1.11
# L3 Fabric information for Rack downlinks - used in jinja2 template
vsx_pair_downlinks:
rack1:
- vsx_pair_asn: 65001 # Must match vsx_pair_asn of corresponding vsx_pair above in leaf group
vsx_pair_downlink_int: 1/1/27
vsx_pair_downlink_ip: 192.168.2.1
vsx_pair_uplink_ip: 192.168.2.0 # Must match L3 address of connecting leaf interface in vsx_pair_L3fabric_ips
- vsx_pair_asn: 65001
vsx_pair_downlink_int: 1/1/28
vsx_pair_downlink_ip: 192.168.2.5
vsx_pair_uplink_ip: 192.168.2.4
rack3:
- vsx_pair_asn: 65003 # Must match vsx_pair_asn of corresponding vsx_pair above in leaf group
vsx_pair_downlink_int: 1/1/24
vsx_pair_downlink_ip: 192.168.2.9
vsx_pair_uplink_ip: 192.168.2.8
- vsx_pair_asn: 65003
vsx_pair_downlink_int: 1/1/23
vsx_pair_downlink_ip: 192.168.2.13
vsx_pair_uplink_ip: 192.168.2.12 # Must match L3 address of connecting leaf interface in vsx_pair_L3fabric_ips
Zone1-Spine2:
ansible_host: 10.10.10.55
loopback0_ip: 192.168.1.12
# L3 Fabric information for Rack downlinks - used in jinja2 template
vsx_pair_downlinks:
rack1:
- vsx_pair_asn: 65001 # Must match vsx_pair_asn of corresponding vsx_pair above in leaf group
vsx_pair_downlink_int: 1/1/27
vsx_pair_downlink_ip: 192.168.2.3
vsx_pair_uplink_ip: 192.168.2.2
- vsx_pair_asn: 65001
vsx_pair_downlink_int: 1/1/28
vsx_pair_downlink_ip: 192.168.2.7
vsx_pair_uplink_ip: 192.168.2.6 # Must match L3 address of connecting leaf interface in vsx_pair_L3fabric_ips
rack3:
- vsx_pair_asn: 65003 # Must match vsx_pair_asn of corresponding vsx_pair above in leaf group
vsx_pair_downlink_int: 1/1/24
vsx_pair_downlink_ip: 192.168.2.11
vsx_pair_uplink_ip: 192.168.2.10
- vsx_pair_asn: 65003
vsx_pair_downlink_int: 1/1/23
vsx_pair_downlink_ip: 192.168.2.15
vsx_pair_uplink_ip: 192.168.2.14 # Must match L3 address of connecting leaf interface in vsx_pair_L3fabric_ips