summaryrefslogtreecommitdiff
path: root/plugins/module_utils
diff options
context:
space:
mode:
authorlucaelin <git@luca.lsys.ac>2026-02-23 13:25:35 +0100
committerGitHub <noreply@github.com>2026-02-23 12:25:35 +0000
commite539028c2f9d062e7684abda5dd32affd92e9f08 (patch)
tree26bdccd9ae304c9d4eef843e60eb61f7ad54e3df /plugins/module_utils
parent8d96e7a700d30667c594ab7880538451f60d7fb4 (diff)
downloadvyos.vyos-e539028c2f9d062e7684abda5dd32affd92e9f08.tar.gz
vyos.vyos-e539028c2f9d062e7684abda5dd32affd92e9f08.zip
add commit-confirm options to vyos_config (#229)
* added vyos_config confirm options * fix: update commit comment to match main * fix: documentation example for automatic confirm * fix: add tests for commit confirm and confirm_timeout options * fix: add config_confirm changelog fragment * fix: lint missing diff parameter for edit_config * fix: add commit confirm integration test --------- Co-authored-by: omnom62 <75066712+omnom62@users.noreply.github.com>
Diffstat (limited to 'plugins/module_utils')
-rw-r--r--plugins/module_utils/network/vyos/vyos.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/module_utils/network/vyos/vyos.py b/plugins/module_utils/network/vyos/vyos.py
index 6bd8daee..4987d6b0 100644
--- a/plugins/module_utils/network/vyos/vyos.py
+++ b/plugins/module_utils/network/vyos/vyos.py
@@ -96,11 +96,13 @@ def run_commands(module, commands, check_rc=True):
return response
-def load_config(module, commands, commit=False, comment=None):
+def load_config(module, commands, commit=False, comment=None, confirm=None):
connection = get_connection(module)
try:
- response = connection.edit_config(candidate=commands, commit=commit, comment=comment)
+ response = connection.edit_config(
+ candidate=commands, commit=commit, comment=comment, confirm=confirm
+ )
except ConnectionError as exc:
module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))