From 098f31c6fe7a6310594656efc0af5a2739ede82b Mon Sep 17 00:00:00 2001 From: omnom62 <75066712+omnom62@users.noreply.github.com> Date: Thu, 8 May 2025 05:52:44 +1000 Subject: T7259 get_config() fix (#404) * T7259 get_config() fix * fix get_config calls * vyos_config match=none integration test case * get_config() update --- plugins/modules/vyos_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/modules') diff --git a/plugins/modules/vyos_config.py b/plugins/modules/vyos_config.py index 60be02c8..c6bc9959 100644 --- a/plugins/modules/vyos_config.py +++ b/plugins/modules/vyos_config.py @@ -286,6 +286,7 @@ def sanitize_config(config, result): def run(module, result): # get the current active config from the node or passed in via # the config param + config = module.params["config"] or get_config(module) # create the candidate config object from the arguments @@ -360,7 +361,7 @@ def main(): diff = run_commands(module, commands=["configure", "compare saved"])[1] if diff not in { "[edit]", - "No changes between working and saved configurations.\n\n[edit]" + "No changes between working and saved configurations.\n\n[edit]", }: if not module.check_mode: run_commands(module, commands=["save"]) -- cgit v1.2.3