Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ecs_taskdefinition containers param should be a list of dict instead of a list of string #243

Closed
mtraynham opened this issue Sep 24, 2020 · 5 comments
Labels
affects_2.10 bug This issue/PR relates to a bug module module needs_triage plugins plugin (any type) python3 traceback

Comments

@mtraynham
Copy link
Contributor

SUMMARY

https://github.com/ansible-collections/community.aws/blob/1.2.0/plugins/modules/ecs_taskdefinition.py#L324

This parameter should be a list of dict objects as it's treated like one through out the module.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ecs_taskdefinition

ANSIBLE VERSION
ansible 2.10.1
CONFIGURATION
OS / ENVIRONMENT

Mac

STEPS TO REPRODUCE

Run any example in the ecs_taskdefinition module

EXPECTED RESULTS

It doesn't fail.

ACTUAL RESULTS

It fails when interpreting the first item in the list as dict using .get(...), but it's actually a string variable.

https://github.com/ansible-collections/community.aws/blob/main/plugins/modules/ecs_taskdefinition.py#L353

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'str' object has no attribute 'get'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"<stdin>\", line 102, in <module>\n  File \"<stdin>\", line 94, in _ansiballz_main\n  File \"<stdin>\", line 40, in invoke_module\n  File \"python/3.8.5/Python.framework/Versions/3.8/lib/python3.8/runpy.py\", line 207, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"python/3.8.5/Python.framework/Versions/3.8/lib/python3.8/runpy.py\", line 97, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"python/3.8.5/Python.framework/Versions/3.8/lib/python3.8/runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\n  File \"/var/folders/9f/9j0qmtnn6b5brh5373r9pyrc0000gn/T/ansible_ecs_taskdefinition_payload_whgf89mk/ansible_ecs_taskdefinition_payload.zip/ansible_collections/community/aws/plugins/modules/ecs_taskdefinition.py\", line 517, in <module>\n  File \"/var/folders/9f/9j0qmtnn6b5brh5373r9pyrc0000gn/T/ansible_ecs_taskdefinition_payload_whgf89mk/ansible_ecs_taskdefinition_payload.zip/ansible_collections/community/aws/plugins/modules/ecs_taskdefinition.py\", line 353, in main\nAttributeError: 'str' object has no attribute 'get'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
@tremble tremble linked a pull request Sep 24, 2020 that will close this issue
@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link

@ansibullbot ansibullbot added affects_2.10 bug This issue/PR relates to a bug module module needs_triage plugins plugin (any type) python3 traceback labels Nov 16, 2020
@Gibby
Copy link

Gibby commented Jan 28, 2021

Any updates on this?

@liff
Copy link

liff commented Feb 1, 2021

This issue is duplicate of #264.

This was fixed in 2610815, which was released in 1.3.0.

@tremble
Copy link
Contributor

tremble commented Feb 1, 2021

Resolved by #284

@tremble tremble closed this as completed Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 bug This issue/PR relates to a bug module module needs_triage plugins plugin (any type) python3 traceback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants