nxos_snapshot fix cherry-pick (#40231)

* save_snapshot_locally nxos_snapshot (#40227)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 979f1e5ed1)

* update changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
pull/40247/head
Trishna Guha 7 years ago committed by GitHub
parent b582ae6e29
commit f1fc7cf384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -32,3 +32,4 @@ bugfixes:
- nxos_logging - remove purge from nxos_logging doc, argspec (https://github.com/ansible/ansible/pull/39947) - nxos_logging - remove purge from nxos_logging doc, argspec (https://github.com/ansible/ansible/pull/39947)
- nxos_ping - Fix nxos_ping issues (https://github.com/ansible/ansible/pull/40028) - nxos_ping - Fix nxos_ping issues (https://github.com/ansible/ansible/pull/40028)
- nxos_vxlan_vtep_vni - Fix nxos_vxlan_vtep_vni test (https://github.com/ansible/ansible/pull/39968) - nxos_vxlan_vtep_vni - Fix nxos_vxlan_vtep_vni test (https://github.com/ansible/ansible/pull/39968)
- nxos_snapshot - Fix logic for save_snapshot_locally (https://github.com/ansible/ansible/pull/40227)

@ -396,7 +396,7 @@ def main():
result['commands'] = action_results result['commands'] = action_results
result['changed'] = True result['changed'] = True
if action == 'create' and module.params['path']: if action == 'create' and module.params['path'] and module.params['save_snapshot_locally']:
command = 'show snapshot | include {}'.format(module.params['snapshot_name']) command = 'show snapshot | include {}'.format(module.params['snapshot_name'])
content = execute_show_command(command, module)[0] content = execute_show_command(command, module)[0]
if content: if content:

@ -13,6 +13,7 @@
action: create action: create
snapshot_name: test_snapshot1 snapshot_name: test_snapshot1
description: Ansible description: Ansible
save_snapshot_locally: true
provider: "{{ connection }}" provider: "{{ connection }}"
- name: create another snapshot - name: create another snapshot
@ -24,6 +25,7 @@
show_command: show ip interface brief show_command: show ip interface brief
row_id: ROW_intf row_id: ROW_intf
element_key1: intf-name element_key1: intf-name
save_snapshot_locally: true
provider: "{{ connection }}" provider: "{{ connection }}"
- name: compare snapshots - name: compare snapshots

Loading…
Cancel
Save