-
Notifications
You must be signed in to change notification settings - Fork 343
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
Issue with ec2_instance module error line 983, in build_volume_spec TypeError: argument of type 'NoneType' is not iterable #1452
Comments
Found out why its throwing the error. New ec2_instance module doesn't require the parameter to list volume type. It seems like it defaults to gp3 automatically for EC2 instance creation. |
Actually after more trial and error volume type parameter isn't the issue that is the reason why its throwing the error. Looks to be something else in the ec2_instance.py code it keeps referring to. It only happens when I run my playbook against and ec2 linux instance. If anyone have seen this before let me know. Thanks |
Wanted to add the same playbook works when deploying a windows ec2 instance to AWS. Only effecting linux ec2 deployments when I set a specific volumes details. I am not iterating anything but yet its complaining about NoneType is not iterable. Works if I leave out the volume details and let it choose the defaults. |
Figured it out. Indentation issue with ebs line in volumes. |
Migrate rds_instance* modules and tests Depends-On: ansible-collections#1011 Depends-On: ansible-collections#1480 Remove rds_instance* modules and tests These modules have been migrated to amazon.aws Update runtime.yml with redirects to that collection Update ignore files Reviewed-by: Mike Graves <[email protected]> Reviewed-by: Bikouo Aubin <None> Reviewed-by: Mark Chappell <None>
Migrate rds_instance* modules and tests Depends-On: ansible-collections#1011 Depends-On: ansible-collections#1480 Remove rds_instance* modules and tests These modules have been migrated to amazon.aws Update runtime.yml with redirects to that collection Update ignore files Reviewed-by: Mike Graves <[email protected]> Reviewed-by: Bikouo Aubin <None> Reviewed-by: Mark Chappell <None>
Migrate rds_instance* modules and tests Depends-On: ansible-collections#1011 Depends-On: ansible-collections#1480 Remove rds_instance* modules and tests These modules have been migrated to amazon.aws Update runtime.yml with redirects to that collection Update ignore files Reviewed-by: Mike Graves <[email protected]> Reviewed-by: Bikouo Aubin <None> Reviewed-by: Mark Chappell <None>
Summary
When using the ec2_instance module I am see this error when running the my playbook against our AWS account.
"Traceback (most recent call last):\n File "/home/runner/.ansible/tmp/ansible-tmp-1680720676.8829982-26-232678818910360/AnsiballZ_ec2_instance.py", line 107, in \n _ansiballz_main()\n File "/home/runner/.ansible/tmp/ansible-tmp-1680720676.8829982-26-232678818910360/AnsiballZ_ec2_instance.py", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/runner/.ansible/tmp/ansible-tmp-1680720676.8829982-26-232678818910360/AnsiballZ_ec2_instance.py", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.amazon.aws.plugins.modules.ec2_instance', init_globals=dict(_module_fqn='ansible_collections.amazon.aws.plugins.modules.ec2_instance', _modlib_path=modlib_path),\n File "/usr/lib64/python3.9/runpy.py", line 225, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_amazon.aws.ec2_instance_payload_r658m511/ansible_amazon.aws.ec2_instance_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_instance.py", line 2108, in \n File "/tmp/ansible_amazon.aws.ec2_instance_payload_r658m511/ansible_amazon.aws.ec2_instance_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_instance.py", line 2102, in main\n File "/tmp/ansible_amazon.aws.ec2_instance_payload_r658m511/ansible_amazon.aws.ec2_instance_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_instance.py", line 1873, in ensure_present\n File "/tmp/ansible_amazon.aws.ec2_instance_payload_r658m511/ansible_amazon.aws.ec2_instance_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_instance.py", line 1329, in build_run_instance_spec\n File "/tmp/ansible_amazon.aws.ec2_instance_payload_r658m511/ansible_amazon.aws.ec2_instance_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_instance.py", line 983, in build_volume_spec\nTypeError: argument of type 'NoneType' is not iterable\n",
Issue Type
Bug Report
Component Name
ec2_instance
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
RHEL 8.6
Steps to Reproduce
Expected Results
I expected the playbook to successfully deploy an ec2 instance but it did not.
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: