From 32bf59d75e877edc70c263288ac4e58740f2d658 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Wed, 7 Sep 2022 21:06:13 +0100 Subject: [PATCH] corrected ID --- plugins/modules/portainer_stack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/portainer_stack.py b/plugins/modules/portainer_stack.py index 0131959..875256a 100644 --- a/plugins/modules/portainer_stack.py +++ b/plugins/modules/portainer_stack.py @@ -141,7 +141,7 @@ def handle_state_present(client, module): target_stack_name = module.params["stack_name"] for stack in stacks: print(stack) - if stack["Name"] == target_stack_name and int(stack["EndpointID"]) == module.params["endpoint_id"]: + if stack["Name"] == target_stack_name and int(stack["EndpointId"]) == module.params["endpoint_id"]: already_exists = True result["stack_id"] = stack["Id"] break