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