mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-31 15:53:09 +00:00
nxos_snmp_user, nxos_snmp_host integration test fixes. (#57201)
* Fix nxos_snmp tests * Add imagetag check for nxos_snmp_user test
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user