Skip to content

Commit

Permalink
feat(edgeos_config): Append save command into result (#189)
Browse files Browse the repository at this point in the history
* feat(edgeos_config): Append save command into result

* style(edgeos_config): Typo

* docs(): Add changelog fragment

Co-authored-by: Pierre GINDRAUD <[email protected]>
Co-authored-by: Pierre GINDRAUD <[email protected]>
  • Loading branch information
3 people authored Nov 18, 2021
1 parent f6a81d1 commit 15df9d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/189-append-save-command-into-result.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- community.network.edgeos_config - append save command into result (https://github.com/ansible-collections/community.network/pull/189)
2 changes: 2 additions & 0 deletions plugins/modules/network/edgeos/edgeos_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ def main():
if module.params['save']:
diff = run_commands(module, commands=['configure', 'compare saved'])[1]
if diff != '[edit]':
if 'commands' in result:
result['commands'].append('save')
if not module.check_mode:
run_commands(module, commands=['save'])
result['changed'] = True
Expand Down

0 comments on commit 15df9d9

Please sign in to comment.