2017-07-27 13:32:35 +00:00
|
|
|
---
|
2017-08-17 08:17:14 +00:00
|
|
|
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_evpn_vni sanity test"
|
2017-07-27 13:32:35 +00:00
|
|
|
|
|
|
|
- name: "Setup"
|
|
|
|
nxos_config: &remove_evpn
|
|
|
|
lines: no nv overlay evpn
|
2017-08-17 08:17:14 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-07-27 13:32:35 +00:00
|
|
|
match: none
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: "Enable feature BGP"
|
2017-08-17 08:17:14 +00:00
|
|
|
nxos_feature:
|
2017-07-27 13:32:35 +00:00
|
|
|
feature: bgp
|
|
|
|
state: enabled
|
2017-08-17 08:17:14 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-07-27 13:32:35 +00:00
|
|
|
|
|
|
|
- name: "Enable nv overlay evpn"
|
2017-08-17 08:17:14 +00:00
|
|
|
nxos_config:
|
2017-07-27 13:32:35 +00:00
|
|
|
lines: nv overlay evpn
|
2017-08-17 08:17:14 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-07-27 13:32:35 +00:00
|
|
|
match: none
|
|
|
|
|
|
|
|
- name: "Configure nxos_evpn_vni"
|
|
|
|
nxos_evpn_vni: &evpn_vni
|
|
|
|
vni: 6000
|
|
|
|
route_distinguisher: "60:10"
|
|
|
|
route_target_import:
|
|
|
|
- "5000:10"
|
|
|
|
- "4100:100"
|
|
|
|
route_target_export: auto
|
2017-08-17 08:17:14 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-07-27 13:32:35 +00:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: &true
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
|
|
|
- name: "Check Idempotence"
|
|
|
|
nxos_evpn_vni: *evpn_vni
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: &false
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
- name: "remove nxos_evpn_vni"
|
|
|
|
nxos_evpn_vni: &rvni
|
|
|
|
vni: 6000
|
|
|
|
state: absent
|
2017-08-17 08:17:14 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-07-27 13:32:35 +00:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
- name: "Check Idempotence"
|
|
|
|
nxos_evpn_vni: *rvni
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
always:
|
|
|
|
- name: "Remove nv overlay evpn"
|
|
|
|
nxos_config: *remove_evpn
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: "Disable feature bgp"
|
2017-08-17 08:17:14 +00:00
|
|
|
nxos_feature:
|
2017-07-27 13:32:35 +00:00
|
|
|
feature: bgp
|
|
|
|
state: disabled
|
2017-08-17 08:17:14 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-07-27 13:32:35 +00:00
|
|
|
ignore_errors: yes
|
|
|
|
|
2017-08-17 08:17:14 +00:00
|
|
|
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_evpn_vni sanity test"
|