From 65e0375550e124bd29216ad5bb361aa1a750ba44 Mon Sep 17 00:00:00 2001 From: chatton Date: Sat, 24 Jun 2023 23:56:44 +0100 Subject: [PATCH] wip --- plugins/modules/portainer_stack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/portainer_stack.py b/plugins/modules/portainer_stack.py index 1ab1929..6e532ed 100644 --- a/plugins/modules/portainer_stack.py +++ b/plugins/modules/portainer_stack.py @@ -120,7 +120,7 @@ def _update_stack(contents, client, module, stack_id): f"stacks/{stack_id}?&endpointId={client.endpoint}", body={ "name": target_stack_name, - "stackFileContent": contents, + "stackFileContent": json.dumps(contents), }, ) @@ -205,7 +205,7 @@ def run_module(): module_args = dict( stack_name=dict(type="str", required=True), docker_compose_file_path=dict(type="str"), - stack_definition=dict(type="str"), + stack_definition=dict(type=str), username=dict(type="str", default="admin"), password=dict(type="str", required=True, no_log=True), endpoint_id=dict(type="int", required=True),