From eac675ea750812fbd72ad6e71adbf267dd611f84 Mon Sep 17 00:00:00 2001 From: SebClem Date: Tue, 17 Sep 2024 15:46:42 +0200 Subject: [PATCH] Fix result --- plugins/action/load_caddy_relay_config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/action/load_caddy_relay_config.py b/plugins/action/load_caddy_relay_config.py index a38c008..188f866 100644 --- a/plugins/action/load_caddy_relay_config.py +++ b/plugins/action/load_caddy_relay_config.py @@ -52,8 +52,7 @@ class ActionModule(ActionBase): self.depth = module_args.get('depth', 0) results = { - "sites": [], - + "sites": [] } failed = False @@ -89,7 +88,9 @@ class ActionModule(ActionBase): if not "target_var" in module_args: result['ansible_facts'] = results else: - result['ansible_facts'][module_args['target_var']] = results + result['ansible_facts'] = { + module_args['target_var']: results + } result['_ansible_no_log'] = not self.show_content return result