Skip to content

Commit

Permalink
Prevent edgeos_config from saving in check mode. (#78)
Browse files Browse the repository at this point in the history
* Prevent edgeos_config from saving in check mode.
  • Loading branch information
AngusWarren authored Jul 7, 2020
1 parent d4c892d commit 5533edb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- edgeos_config - fixed issue where config could be saved while in check mode (https://github.com/ansible-collections/community.network/pull/78)
3 changes: 2 additions & 1 deletion plugins/modules/network/edgeos/edgeos_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ def main():
if module.params['save']:
diff = run_commands(module, commands=['configure', 'compare saved'])[1]
if diff != '[edit]':
run_commands(module, commands=['save'])
if not module.check_mode:
run_commands(module, commands=['save'])
result['changed'] = True
run_commands(module, commands=['exit'])

Expand Down

0 comments on commit 5533edb

Please sign in to comment.