* Fix nxos_snmp tests
* Add imagetag check for nxos_snmp_user test
(cherry picked from commit 87422ea7e7
)
This commit is contained in:
parent
28db439e01
commit
b8a41594fc
2 changed files with 8 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
- set_fact: snmp_type="inform"
|
||||
- set_fact: snmp_version="v3"
|
||||
- set_fact: snmp_auth="noauth"
|
||||
- set_fact: snmp_auth="priv"
|
||||
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type }} {{ snmp_version }} sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- set_fact: delete_last_user_allowed='true'
|
||||
- set_fact: delete_last_user_allowed='false'
|
||||
when: imagetag and (imagetag is version_compare('9.1', 'ge'))
|
||||
- set_fact: delete_last_user_allowed='false'
|
||||
when: platform is search('N5K|N6K|N9K-F')
|
||||
|
||||
- name: Remove snmp user
|
||||
nxos_snmp_user: &remove_snmp_user
|
||||
user: ntc
|
||||
|
@ -95,7 +101,7 @@
|
|||
register: result
|
||||
|
||||
- assert: *false
|
||||
when: platform is not search('N5K|N6K|N9K-F')
|
||||
when: delete_last_user_allowed
|
||||
|
||||
always:
|
||||
- name: delete snmp user
|
||||
|
|
Loading…
Add table
Reference in a new issue