blob: d7e09b2536be926773ef5c9f7b362da587d001f2 (
plain)
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
|
---
- debug: msg="START connection={{ ansible_connection }} nxos_evpn_global sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: "Setup"
nxos_config: &remove_evpn_config
lines: no nv overlay evpn
match: none
ignore_errors: yes
- name: "Disable feature nv overlay"
nxos_feature: &disable_feature_nv_overlay
feature: nv overlay
state: disabled
ignore_errors: yes
- block:
- name: "Enable feature nv overlay"
nxos_feature: &enable_feature_nv_overlay
feature: nv overlay
state: enabled
ignore_errors: yes
- name: "Enable nv overlay evpn"
nxos_evpn_global: &enable_evpn
nv_overlay_evpn: true
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
register: result
- assert: *true
- name: "CHECK DEMPOTENCE - Disable nv overlay evpn"
nxos_evpn_global: *disable_evpn
register: result
- assert: *false
when: not ( platform is search('N3K|N35|N3L'))
rescue:
- debug: msg="connection={{ ansible_connection }} nxos_evpn_global sanity test - FALURE ENCOUNTERED"
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
- debug: msg="END connection={{ ansible_connection }} nxos_evpn_global sanity test"
|