From 8c456d8e38256dbf7fc7b48eeb444815a17f2a75 Mon Sep 17 00:00:00 2001 From: Francisco Gray Date: Tue, 23 Oct 2018 06:38:52 -0700 Subject: [PATCH] - Moved data sanitization logic so it is no longer conditionally applied (#41405) --- lib/ansible/modules/cloud/amazon/ecs_service.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/modules/cloud/amazon/ecs_service.py b/lib/ansible/modules/cloud/amazon/ecs_service.py index d6881443992..bd9ab1c44eb 100644 --- a/lib/ansible/modules/cloud/amazon/ecs_service.py +++ b/lib/ansible/modules/cloud/amazon/ecs_service.py @@ -523,6 +523,10 @@ def main(): loadBalancer['containerPort'] = int(loadBalancer['containerPort']) loadBalancers.append(loadBalancer) + for loadBalancer in loadBalancers: + if 'containerPort' in loadBalancer: + loadBalancer['containerPort'] = int(loadBalancer['containerPort']) + if update: if (existing['loadBalancers'] or []) != loadBalancers: module.fail_json(msg="It is not possible to update the load balancers of an existing service")