2017-08-10 09:29:13 +00:00
|
|
|
---
|
2017-08-17 08:17:14 +00:00
|
|
|
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_evpn_global sanity test"
|
2017-08-10 09:29:13 +00:00
|
|
|
|
|
|
|
- name: "Setup"
|
|
|
|
nxos_config: &remove_evpn_config
|
|
|
|
lines: no nv overlay evpn
|
|
|
|
match: none
|
2017-08-17 08:17:14 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-08-10 09:29:13 +00:00
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: "Disable feature nv overlay"
|
|
|
|
nxos_feature: &disable_feature_nv_overlay
|
|
|
|
feature: nv overlay
|
|
|
|
state: disabled
|
2017-08-17 08:17:14 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-08-10 09:29:13 +00:00
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: "Enable feature nv overlay"
|
|
|
|
nxos_feature: &enable_feature_nv_overlay
|
|
|
|
feature: nv overlay
|
|
|
|
state: enabled
|
2017-08-17 08:17:14 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-08-10 09:29:13 +00:00
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: "Enable nv overlay evpn"
|
|
|
|
nxos_evpn_global: &enable_evpn
|
|
|
|
nv_overlay_evpn: true
|
2017-08-17 08:17:14 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-08-10 09:29:13 +00:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: &true
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
|
|
|
- name: "CHECK IDEMPOTENCE - enable nv overlay evpn"
|
|
|
|
nxos_evpn_global: *enable_evpn
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: &false
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
- name: "Disable nv overlay evpn"
|
|
|
|
nxos_evpn_global: &disable_evpn
|
|
|
|
nv_overlay_evpn: false
|
2017-08-17 08:17:14 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-08-10 09:29:13 +00:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
- name: "CHECK DEMPOTENCE - Disable nv overlay evpn"
|
|
|
|
nxos_evpn_global: *disable_evpn
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
2017-11-27 22:58:08 +00:00
|
|
|
when: not ( platform is search('N3K'))
|
2017-08-10 09:29:13 +00:00
|
|
|
|
|
|
|
rescue:
|
2017-08-17 08:17:14 +00:00
|
|
|
- debug: msg="TRANSPORT:{{ connection.transport }} nxos_evpn_global sanity test - FALURE ENCOUNTERED"
|
2017-08-10 09:29:13 +00:00
|
|
|
|
|
|
|
always:
|
|
|
|
|
|
|
|
- name: "Cleanup - Disable nv overlay evpn"
|
|
|
|
nxos_config: *remove_evpn_config
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: "Cleanup - Disable feature nv overlay"
|
|
|
|
nxos_feature: *disable_feature_nv_overlay
|
|
|
|
ignore_errors: yes
|
|
|
|
|
2017-08-17 08:17:14 +00:00
|
|
|
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_evpn_global sanity test"
|