mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
fix nxos_vrf removal failure (#27547)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
committed by
Chris Alfonso
parent
23ec711494
commit
407dc2dc68
@@ -257,15 +257,15 @@ def main():
|
|||||||
command = get_commands_to_config_vrf(delta, vrf)
|
command = get_commands_to_config_vrf(delta, vrf)
|
||||||
commands.extend(command)
|
commands.extend(command)
|
||||||
|
|
||||||
if commands:
|
if state == 'present' and commands:
|
||||||
if proposed.get('vni'):
|
if proposed.get('vni'):
|
||||||
if existing.get('vni') and existing.get('vni') != '':
|
if existing.get('vni') and existing.get('vni') != '':
|
||||||
commands.insert(1, 'no vni {0}'.format(existing['vni']))
|
commands.insert(1, 'no vni {0}'.format(existing['vni']))
|
||||||
|
|
||||||
if not module.check_mode:
|
if commands and not module.check_mode:
|
||||||
load_config(module, commands)
|
load_config(module, commands)
|
||||||
|
|
||||||
results['changed'] = True
|
results['changed'] = True
|
||||||
|
|
||||||
if 'configure' in commands:
|
if 'configure' in commands:
|
||||||
commands.pop(0)
|
commands.pop(0)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user