Closed jorgenspange closed 1 month ago
@jorgenspange What is the NX-OS versions running on the 7K and 5K?
@NilashishC
Thanks for prompt reply, these are the versions:
N5k: 7.3(13)N1(1)
N7k: 8.4(6a)
@NilashishC managed to figure this out, as my playbook actually specified v2key for these hosts aswell.
Although there are still many problems with this module, if i try state deleted and a user is not there it fails:
fatal: [5k]: FAILED! => changed=false
module_stderr: |-
no snmp-server user snmpuser use-ipv4acl SNMP
user not found
5k(config)#
module_stdout: ''
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
Guess it's the same issue that i addressed here, where users are removed or added every run when using state replaced or overridden: https://github.com/ansible-collections/cisco.nxos/issues/803
@jorgenspange I have responded to #803. Please have a look when you have time.
Regarding this issue, you're correct, this module supports for localizedkey and localizedv2key. You need to specify the correct one as per your target device.
With that, I'll close this ticket. We can continue discussing the overridden issue in #803. Thanks!
SUMMARY
cisco.nxos.nxos_snmp_server fails with state replaced on nexus 5k and nexus 7k due to different syntax
ISSUE TYPE
COMPONENT NAME
cisco.nxos.nxos_snmp_server
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
MacBook Pro 2021 M1
STEPS TO REPRODUCE
Using state replaced or overridden on snmpv3 credentials on N5k and N7k makes it fail as the syntax is localizedkey and not localizedV2key