support_definition
chatton 2 years ago
parent 86f77651f4
commit ea287b683e

@ -119,13 +119,12 @@ def _create_stack(client, module, file_contents):
def _update_stack(client, module, stack_id): def _update_stack(client, module, stack_id):
target_stack_name = module.params["stack_name"] target_stack_name = module.params["stack_name"]
with open(module.params["docker_compose_file_path"]) as f: contents = _get_stack_contents(module.params)
file_contents = f.read()
return client.put( return client.put(
f"stacks/{stack_id}?&endpointId={client.endpoint}", f"stacks/{stack_id}?&endpointId={client.endpoint}",
body={ body={
"name": target_stack_name, "name": target_stack_name,
"stackFileContent": file_contents, "stackFileContent": contents,
}, },
) )

Loading…
Cancel
Save