If an snmp community is already absent, then the play fails with the error:
TASK [dellemc.os6.os6_snmp : Provisioning SNMP configuration for os6] **********************************
fatal: [<REDACTED>]: FAILED! => {
"changed": false,
"command": "no snmp-server community <REDACTED>",
"rc": -32603
}
MSG:
no snmp-server community <REDACTED>
Error:That community does not exists.
<REDACTED>(config)#
SUMMARY
If an snmp community is already absent, then the play fails with the error:
ISSUE TYPE
COMPONENT NAME
dellemc.os6.os6_snmp
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
Using the following playbook, the
os6_snmp
task fails when trying to remove an snmp community that has already been removed.in group_vars/all.yaml:
in the playbook:
EXPECTED RESULTS
task should be skipped if communities are not present
ACTUAL RESULTS