ecs_taskdefinition module : Convert environment variables to string (#23297) (#23337)

Before modification, it fails unless it is a string type
(cherry picked from commit dff35bc205)
This commit is contained in:
John R Barker 2017-04-06 11:19:42 +01:00 committed by GitHub
parent d6a8f10a70
commit 84d09cdf32

View file

@ -342,6 +342,10 @@ def main():
if not module.check_mode: if not module.check_mode:
# Doesn't exist. create it. # Doesn't exist. create it.
volumes = module.params.get('volumes', []) or [] 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'], results['taskdefinition'] = task_mgr.register_task(module.params['family'],
module.params['task_role_arn'], module.params['task_role_arn'],
module.params['network_mode'], module.params['network_mode'],