ecs_taskdefinition can absent without containers argument (#41398)

* ecs_taskdefinition can absent without containers argument

* add regression test for absent with arn

* Add PassRole privilege for ecs_cluster to pass
This commit is contained in:
Calvin Wu 2018-07-12 21:16:41 +08:00 committed by Will Thames
parent e4c28571d0
commit 7e42e88cc1
3 changed files with 29 additions and 4 deletions

View file

@ -325,9 +325,10 @@ def main():
if not module.botocore_at_least('1.10.44'):
module.fail_json(msg='botocore needs to be version 1.10.44 or higher to use execution_role_arn')
for container in module.params.get('containers', []):
for environment in container.get('environment', []):
environment['value'] = to_text(environment['value'])
if module.params['containers']:
for container in module.params['containers']:
for environment in container.get('environment', []):
environment['value'] = to_text(environment['value'])
if module.params['state'] == 'present':
if 'containers' not in module.params or not module.params['containers']: