From cb75e33eb3be0ae61140a15e0379a13b21183326 Mon Sep 17 00:00:00 2001 From: chatton Date: Sun, 25 Jun 2023 00:06:47 +0100 Subject: [PATCH] wip --- plugins/modules/portainer_stack.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/modules/portainer_stack.py b/plugins/modules/portainer_stack.py index 60db200..85ebb1d 100644 --- a/plugins/modules/portainer_stack.py +++ b/plugins/modules/portainer_stack.py @@ -171,8 +171,7 @@ def handle_state_present(client, module): with open(module.params["docker_compose_file_path"]) as f: contents = f.read() elif module.params.get("stack_definition"): - json_obj = json.loads(module.params["stack_definition"]) - contents = json.dumps(json_obj, indent=4) + contents = json.dumps(module.params["stack_definition"], indent=4) else: raise ValueError("Should not be able to be here!")