diff options
4 files changed, 7 insertions, 4 deletions
diff --git a/changelogs/fragments/nxos_l3_interface_no_switchport_fix_2.5.5.yaml b/changelogs/fragments/nxos_l3_interface_no_switchport_fix_2.5.5.yaml new file mode 100644 index 0000000000..01e044922d --- /dev/null +++ b/changelogs/fragments/nxos_l3_interface_no_switchport_fix_2.5.5.yaml @@ -0,0 +1,2 @@ +bugfixes: +- Fix nxos_l3_interface no switchport issue with loopback and svi interfaces (https://github.com/ansible/ansible/pull/37392). diff --git a/changelogs/fragments/nxos_snapshot_fix_2.5.5.yaml b/changelogs/fragments/nxos_snapshot_fix_2.5.5.yaml new file mode 100644 index 0000000000..6a8a540b4c --- /dev/null +++ b/changelogs/fragments/nxos_snapshot_fix_2.5.5.yaml @@ -0,0 +1,2 @@ +bugfixes: +- Fix nxos_snapshot compare_option (https://github.com/ansible/ansible/pull/41386). diff --git a/lib/ansible/modules/network/nxos/nxos_l3_interface.py b/lib/ansible/modules/network/nxos/nxos_l3_interface.py index 4dd57c7f9f..c34bb92683 100644 --- a/lib/ansible/modules/network/nxos/nxos_l3_interface.py +++ b/lib/ansible/modules/network/nxos/nxos_l3_interface.py @@ -122,7 +122,6 @@ def map_obj_to_commands(updates, module): if command: command.append('exit') command.insert(0, 'interface {0}'.format(name)) - command.insert(1, 'no switchport') commands.extend(command) elif state == 'present' and obj_in_have: @@ -135,10 +134,8 @@ def map_obj_to_commands(updates, module): if command: command.append('exit') command.insert(0, 'interface {0}'.format(name)) - command.insert(1, 'no switchport') elif not ipv4 and not ipv6: command.append('interface {0}'.format(name)) - command.append('no switchport') commands.extend(command) return commands diff --git a/lib/ansible/modules/network/nxos/nxos_snapshot.py b/lib/ansible/modules/network/nxos/nxos_snapshot.py index f095bc4e0e..c8deca8eae 100644 --- a/lib/ansible/modules/network/nxos/nxos_snapshot.py +++ b/lib/ansible/modules/network/nxos/nxos_snapshot.py @@ -386,7 +386,9 @@ def main(): snapshot1 = module.params['snapshot1'] snapshot2 = module.params['snapshot2'] compare_option = module.params['compare_option'] - command = 'show snapshot compare {0} {1} {2}'.format(snapshot1, snapshot2, compare_option) + command = 'show snapshot compare {0} {1}'.format(snapshot1, snapshot2) + if compare_option: + command += ' {0}'.format(compare_option) content = execute_show_command(command, module)[0] if content: write_on_file(content, comparison_results_file, module) |