You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to use the ec2_security_group module using a mixed set of rules (some with group_name and other with ip_prefix), the module fails, but only when I running in diff mode!
The full traceback is:Traceback (most recent call last): File "/Users/fab/.ansible/tmp/ansible-tmp-1730383349.294612-15017-244652880603202/AnsiballZ_ec2_security_group.py", line 107, in <module> _ansiballz_main() File "/Users/fab/.ansible/tmp/ansible-tmp-1730383349.294612-15017-244652880603202/AnsiballZ_ec2_security_group.py", line 99, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "/Users/fab/.ansible/tmp/ansible-tmp-1730383349.294612-15017-244652880603202/AnsiballZ_ec2_security_group.py", line 47, in invoke_module runpy.run_module(mod_name='ansible_collections.amazon.aws.plugins.modules.ec2_security_group', init_globals=dict(_module_fqn='ansible_collections.amazon.aws.plugins.modules.ec2_security_group', _modlib_path=modlib_path), File "<frozen runpy>", line 226, in run_module File "<frozen runpy>", line 98, in _run_module_code File "<frozen runpy>", line 88, in _run_code File "/var/folders/4d/j1qvv2mn3hb3zcvw97k58hd80000gp/T/ansible_amazon.aws.ec2_security_group_payload_0n6mkmxx/ansible_amazon.aws.ec2_security_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_security_group.py", line 1776, in <module> File "/var/folders/4d/j1qvv2mn3hb3zcvw97k58hd80000gp/T/ansible_amazon.aws.ec2_security_group_payload_0n6mkmxx/ansible_amazon.aws.ec2_security_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_security_group.py", line 1768, in main File "/var/folders/4d/j1qvv2mn3hb3zcvw97k58hd80000gp/T/ansible_amazon.aws.ec2_security_group_payload_0n6mkmxx/ansible_amazon.aws.ec2_security_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_security_group.py", line 1447, in sort_security_groupTypeError: '<' not supported between instances of 'NoneType' and 'str'fatal: [localhost]: FAILED! => { "changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/Users/fab/.ansible/tmp/ansible-tmp-1730383349.294612-15017-244652880603202/AnsiballZ_ec2_security_group.py\", line 107, in <module>\n _ansiballz_main()\n File \"/Users/fab/.ansible/tmp/ansible-tmp-1730383349.294612-15017-244652880603202/AnsiballZ_ec2_security_group.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/Users/fab/.ansible/tmp/ansible-tmp-1730383349.294612-15017-244652880603202/AnsiballZ_ec2_security_group.py\", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.amazon.aws.plugins.modules.ec2_security_group', init_globals=dict(_module_fqn='ansible_collections.amazon.aws.plugins.modules.ec2_security_group', _modlib_path=modlib_path),\n File \"<frozen runpy>\", line 226, in run_module\n File \"<frozen runpy>\", line 98, in _run_module_code\n File \"<frozen runpy>\", line 88, in _run_code\n File \"/var/folders/4d/j1qvv2mn3hb3zcvw97k58hd80000gp/T/ansible_amazon.aws.ec2_security_group_payload_0n6mkmxx/ansible_amazon.aws.ec2_security_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_security_group.py\", line 1776, in <module>\n File \"/var/folders/4d/j1qvv2mn3hb3zcvw97k58hd80000gp/T/ansible_amazon.aws.ec2_security_group_payload_0n6mkmxx/ansible_amazon.aws.ec2_security_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_security_group.py\", line 1768, in main\n File \"/var/folders/4d/j1qvv2mn3hb3zcvw97k58hd80000gp/T/ansible_amazon.aws.ec2_security_group_payload_0n6mkmxx/ansible_amazon.aws.ec2_security_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_security_group.py\", line 1447, in sort_security_group\nTypeError: '<' not supported between instances of 'NoneType' and 'str'\n",
"module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
Code of Conduct
I agree to follow the Ansible Code of Conduct
The text was updated successfully, but these errors were encountered:
Summary
When I try to use the
ec2_security_group
module using a mixed set of rules (some withgroup_name
and other withip_prefix
), the module fails, but only when I running indiff
mode!Issue Type
Bug Report
Component Name
ec2_security_group
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
MacBook Pro
Chip: Apple M1 Pro
macOS: Sonoma 14.6.1
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin23)
Homebrew 4.4.2
Steps to Reproduce
Tested with this simple playbook:
Run the playbook with the
--diff
Expected Results
I expected the task to succeed.
Actual Results
The task fails.
These details are obtained with
-vvv
verbosity.Code of Conduct
The text was updated successfully, but these errors were encountered: