-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnxos_add_vlans_leafs_N1.yaml
53 lines (42 loc) · 1.26 KB
/
nxos_add_vlans_leafs_N1.yaml
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
---
- name: Vxlan VLAN & VNI Provisioning
hosts: leafs
gather_facts: no
connection: local
vars:
nxos_provider:
# username: "{{ un }}"
# password: "{{ pwd }}"
transport: cli
authorize: no
host: "{{ ansible_host }}"
tasks:
- name: CREATE VLANS and MAP TO VNI-SEGMENT
nxos_vlan:
vlan_id: "{{ vlan_id }}"
name: "{{ vlan_name }} "
mapped_vni: "{{ vni_id }}"
provider: "{{ nxos_provider }}"
- name: Add SVI- Distributed gateway for vlan-{{ vlan_id }}
nxos_config:
lines:
- description "PROD-VLAN{{ vlan_id }}"
- no shutdown
- vrf member TENANT-1
- "ip address {{ gateway_ip }}"
- fabric forwarding mode anycast-gateway
parents: "interface Vlan{{ vlan_id }}"
provider: "{{ nxos_provider }}"
- name: Add L2VNI VNI_ID to Overlay
nxos_vxlan_vtep_vni:
interface: nve1
vni: "{{ vni_id }}"
multicast_group: "{{ mcast_group }}"
suppress_arp: true
provider: "{{ nxos_provider }}"
- name: Add L2VNI VNI_ID to EVPN
nxos_evpn_vni:
vni: "{{ vni_id }}"
route_distinguisher: auto
route_target_both: auto
provider: "{{ nxos_provider }}"