New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cisco.ios.ios_snmp_server module is NOT applying commands correctly, so causing errors. #1071
Comments
@JuanBH255 The above issue is fixed in PR #1073, let me know if this fixes it at your end. |
@roverflow has fixed been publish for me to test yet? |
Hey, yes it has been push upstream, it is not released on galaxy yet but the repo is updated with the fix, you could take a pull from the repo and test it out |
Okay I installed it via the repo like this: I no longer get the error but it is also not idempotent and looks like a change every time I run the playbook. |
@roverflow Below is the full output:
|
@JuanBH255 The play will not be idempotent as there are |
@roverflow I do not like that. A module should be able to detect if the config already exists or is required to make a change. If it's not idempotent than this will look like a change is being made every time. This was not an issue for me on collection version 5.3.0
|
@JuanBH255 Yes, Unfortunately the above behavior of it being idempotent is actually a bug and was fixed in this pr here. Hence it is not idempotent |
@JuanBH255 i will be closing off the issue as the above issue is resolved, please feel free to open another issue if you face any. Thanks! |
@roverflow What about the "snmp-server host 10.1.1.1 vrf Mgmt-intf version 3 priv test_user" command? Why is this not idempotent? this isnt using passwords/secrets in the command so should match exact running config. |
@roverflow Can you reopen the issue? "snmp-server host 10.1.1.1 vrf Mgmt-intf version 3 priv test_user" works now but isnt idempotent when it should be as this isnt using passwords/secrets in the command |
@JuanBH255 Taking a look at that! Thanks for noticing that, will get back to you on that issue! |
@JuanBH255 Could you check with the latest changes and let me know if that fixes your issue. |
@JuanBH255 I would be closing this issue as the latest pr merged fixed the above issue, please feel free to open another issue if you face any. |
SUMMARY
cisco.ios.ios_snmp_server module is NOT applying commands correctly, so causing errors.
The correct way this command should be applied is:
snmp-server host 10.1.1.1 vrf Mgmt-intf version 3 priv test_user
But every time I run the playbook it tries to run the command like this instead:
snmp-server host 10.1.1.1 version 3 priv vrf Mgmt-intf test_user
^
% Invalid input detected at '^' marker.
ISSUE TYPE
COMPONENT NAME
cisco.ios.ios_snmp_server
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Cisco C8500-12X
Cisco IOS XE Software, Version 17.03.04a
STEPS TO REPRODUCE
EXPECTED RESULTS
Either No change:
ok=1 changed=0
Or a change:
ok=0 changed=1
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: