From 84d09cdf32a4eb571919d81780186f8c488997a2 Mon Sep 17 00:00:00 2001 From: John R Barker Date: Thu, 6 Apr 2017 11:19:42 +0100 Subject: [PATCH] ecs_taskdefinition module : Convert environment variables to string (#23297) (#23337) Before modification, it fails unless it is a string type (cherry picked from commit dff35bc205c176a2f9b187e9849b96d311e1e141) --- lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py b/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py index ff1d89e15de..36e01b2c9fd 100644 --- a/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py +++ b/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py @@ -342,6 +342,10 @@ def main(): if not module.check_mode: # Doesn't exist. create it. volumes = module.params.get('volumes', []) or [] + for container in module.params['containers']: + if 'environment' in container: + for environment in container['environment']: + environment['value'] = str(environment['value']) results['taskdefinition'] = task_mgr.register_task(module.params['family'], module.params['task_role_arn'], module.params['network_mode'],