summaryrefslogtreecommitdiff
path: root/plugins/module_utils/network
diff options
context:
space:
mode:
authoromnom62 <75066712+omnom62@users.noreply.github.com>2025-05-08 05:52:44 +1000
committerGitHub <noreply@github.com>2025-05-08 05:52:44 +1000
commit098f31c6fe7a6310594656efc0af5a2739ede82b (patch)
treea459e02e00c8848638e66a6ff121853a3f6a217c /plugins/module_utils/network
parent7a4f22fc4a63bad749b4128495d7dae8917d0b0e (diff)
downloadvyos.vyos-main.tar.gz
vyos.vyos-main.zip
T7259 get_config() fix (#404)HEADmain
* T7259 get_config() fix * fix get_config calls * vyos_config match=none integration test case * get_config() update
Diffstat (limited to 'plugins/module_utils/network')
-rw-r--r--plugins/module_utils/network/vyos/vyos.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/module_utils/network/vyos/vyos.py b/plugins/module_utils/network/vyos/vyos.py
index 1430b1b1..f37294e6 100644
--- a/plugins/module_utils/network/vyos/vyos.py
+++ b/plugins/module_utils/network/vyos/vyos.py
@@ -34,6 +34,7 @@ import json
from ansible.module_utils._text import to_text
from ansible.module_utils.connection import Connection, ConnectionError
+
_DEVICE_CONFIGS = {}
@@ -68,8 +69,8 @@ def get_config(module, flags=None, format=None):
flags = [] if flags is None else flags
global _DEVICE_CONFIGS
- if _DEVICE_CONFIGS != {}:
- return _DEVICE_CONFIGS
+ if _DEVICE_CONFIGS != {} or module.params["match"] == "none":
+ return to_text(_DEVICE_CONFIGS)
else:
connection = get_connection(module)
try: