Fix nxos_snmp_community command ordering (#66094)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
This commit is contained in:
parent
bac2e02900
commit
4674435367
1 changed files with 6 additions and 2 deletions
|
@ -153,9 +153,12 @@ def config_snmp_community(delta, community):
|
|||
'no_acl': 'no snmp-server community {0} use-acl {no_acl}'
|
||||
}
|
||||
commands = []
|
||||
for k, v in delta.items():
|
||||
for k in delta.keys():
|
||||
cmd = CMDS.get(k).format(community, **delta)
|
||||
if cmd:
|
||||
if 'group' in cmd:
|
||||
commands.insert(0, cmd)
|
||||
else:
|
||||
commands.append(cmd)
|
||||
cmd = None
|
||||
return commands
|
||||
|
@ -219,6 +222,7 @@ def main():
|
|||
commands.append(command)
|
||||
|
||||
cmds = flatten_list(commands)
|
||||
|
||||
if cmds:
|
||||
results['changed'] = True
|
||||
if not module.check_mode:
|
||||
|
|
Loading…
Reference in a new issue