diff options
author | AngusWarren <angus@warren.bz> | 2020-07-30 04:32:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-29 20:32:16 +0000 |
commit | 84e5bb7da5cbafdd64325d26d57abc9bcf79b2dc (patch) | |
tree | 85daf81861c6fa0d939b489b06e6b93bacc1bfe9 /plugins/modules/vyos_config.py | |
parent | 1795b189f7a3ca83ff3c67e189cfd1c83cc4b433 (diff) | |
download | vyos.vyos-84e5bb7da5cbafdd64325d26d57abc9bcf79b2dc.tar.gz vyos.vyos-84e5bb7da5cbafdd64325d26d57abc9bcf79b2dc.zip |
Prevent vyos_config from saving in check mode. (#53)
Prevent vyos_config from saving in check mode.
Reviewed-by: https://github.com/apps/ansible-zuul
Diffstat (limited to 'plugins/modules/vyos_config.py')
-rw-r--r-- | plugins/modules/vyos_config.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/modules/vyos_config.py b/plugins/modules/vyos_config.py index 893cd64..5e4836d 100644 --- a/plugins/modules/vyos_config.py +++ b/plugins/modules/vyos_config.py @@ -349,7 +349,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"]) |