Skip to content

Commit

Permalink
save_snapshot_locally nxos_snapshot (ansible#40227)
Browse files Browse the repository at this point in the history
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
  • Loading branch information
trishnaguha committed May 16, 2018
1 parent 86c945a commit 979f1e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/modules/network/nxos/nxos_snapshot.py
Expand Up @@ -372,7 +372,7 @@ def main():
result['commands'] = action_results
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'])
content = execute_show_command(command, module)[0]
if content:
Expand Down
Expand Up @@ -13,6 +13,7 @@
action: create
snapshot_name: test_snapshot1
description: Ansible
save_snapshot_locally: true
provider: "{{ connection }}"

- name: create another snapshot
Expand All @@ -24,6 +25,7 @@
show_command: show ip interface brief
row_id: ROW_intf
element_key1: intf-name
save_snapshot_locally: true
provider: "{{ connection }}"

- name: compare snapshots
Expand Down

0 comments on commit 979f1e5

Please sign in to comment.