|
|
|
@ -9,7 +9,7 @@
|
|
|
|
|
|
|
|
|
|
# Select interface for test
|
|
|
|
|
- set_fact: intname="{{ nxos_int1 }}"
|
|
|
|
|
when: not (platform is match("N5K"))
|
|
|
|
|
when: platform is not search('N5K|N6K')
|
|
|
|
|
|
|
|
|
|
- name: Setup - Remove snmp_host if configured
|
|
|
|
|
nxos_snmp_host: &remove
|
|
|
|
@ -17,30 +17,30 @@
|
|
|
|
|
community: TESTING
|
|
|
|
|
udp: 222
|
|
|
|
|
v3: "{{ snmp_auth|default(omit) }}"
|
|
|
|
|
version: "{{ snmp_version }}"
|
|
|
|
|
snmp_type: "{{ snmp_type }}"
|
|
|
|
|
version: "{{ snmp_version }}"
|
|
|
|
|
snmp_type: "{{ snmp_type }}"
|
|
|
|
|
vrf: management
|
|
|
|
|
vrf_filter: management
|
|
|
|
|
src_intf: "{{ intname|default(omit) }}"
|
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
state: absent
|
|
|
|
|
state: absent
|
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
|
|
- block:
|
|
|
|
|
|
|
|
|
|
- name: Configure snmp host
|
|
|
|
|
- name: Configure snmp host
|
|
|
|
|
nxos_snmp_host: &config
|
|
|
|
|
snmp_host: 192.0.2.3
|
|
|
|
|
community: TESTING
|
|
|
|
|
udp: 222
|
|
|
|
|
v3: "{{ snmp_auth|default(omit) }}"
|
|
|
|
|
version: "{{ snmp_version }}"
|
|
|
|
|
snmp_type: "{{ snmp_type }}"
|
|
|
|
|
version: "{{ snmp_version }}"
|
|
|
|
|
snmp_type: "{{ snmp_type }}"
|
|
|
|
|
vrf: management
|
|
|
|
|
vrf_filter: management
|
|
|
|
|
src_intf: "{{ intname|default(omit) }}"
|
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
state: present
|
|
|
|
|
state: present
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
- assert: &true
|
|
|
|
@ -62,7 +62,7 @@
|
|
|
|
|
udp: 222
|
|
|
|
|
vrf_filter: default
|
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
state: present
|
|
|
|
|
state: present
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
@ -72,7 +72,7 @@
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
when: not (platform is match('N35|N5K'))
|
|
|
|
|
when: platform is not search('N35|N5K|N6K')
|
|
|
|
|
|
|
|
|
|
- name: remove some configuration
|
|
|
|
|
nxos_snmp_host: &rem1
|
|
|
|
@ -110,7 +110,7 @@
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
when: not (platform is match('N35|N5K'))
|
|
|
|
|
when: platform is not search('N35|N5K|N6K')
|
|
|
|
|
|
|
|
|
|
- name: Cleanup
|
|
|
|
|
nxos_snmp_host: *remove
|
|
|
|
|