Open WRobertson2 opened 8 months ago
I was able to get what I consider to be the expected behavior by applying this patch. I think it would be better to except
a particular type of exception, but it was a quick-and-dirty test.
I'm hitting the same issue. Adding both the "key" and "password" allows the task to work, but obviously isn't how this module is supposed to function.
The error message I'm seeing is this:
TASK [All-in-one SNMP configuration] ****************************************************************************************************************************************************************************************************
task path: /home/userxyz/ansible/snmp_v3_configure_playbook.yml:134
redirecting (type: action) junipernetworks.junos.junos_snmp_server to junipernetworks.junos.junos
redirecting (type: action) junipernetworks.junos.junos_snmp_server to junipernetworks.junos.junos
redirecting (type: action) junipernetworks.junos.junos_snmp_server to junipernetworks.junos.junos
fatal: [mydevice]: FAILED! => {
"changed": false,
"module_stderr": "'key'",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error"
}
Any news on getting a fix for this?
SUMMARY
When trying to execute a play using junos_snmp_server using SNMPv3, when attempting a configuration with
authentication_sha
orprivacy_aes128
, (attempting to configure using thepassword
key instead of the hashedkey
) I receive an error for a missing "key" value.When configuring via the command line, I am able to successfully configure the two secrets using authentication-password/privacy-password without the respective -key command. In fact, if specified with both -key and -password values, the -password appears to take precedence.
ISSUE TYPE
COMPONENT NAME
junipernetworks.junos.snmp_server config: snmp_v3: usm: local_engine: users:
ANSIBLE VERSION
Also tried:
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Target device JunOS version: JunOS 20.4R3-S5.4
STEPS TO REPRODUCE
EXPECTED RESULTS
The same as
set snmp v3 usm local-engine user $USERNAME authentication-sha authentication-password $PASSWORD
andset snmp v3 usm local-engine user $USERNAME privacy-aes128 privacy-password $PASSWORD
. Namely, that the configuration file is changed to include the hashed results of the given password values, without prompting for a hashed input.ACTUAL RESULTS
Error is thrown, and ansible seems upset that I never specified a key, only a password. In fact, if run again with both a password and a key, the configuration completes successfully.