-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
fix assign_public ip for ecs_service #41685
fix assign_public ip for ecs_service #41685
Conversation
@@ -324,6 +327,10 @@ def format_network_configuration(self, network_config): | |||
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: | |||
self.module.fail_json_aws(e, msg="Couldn't look up security groups") | |||
result['securityGroups'] = groups | |||
if 'assign_public_ip' in network_config and botocore_version >= distutils.version.StrictVersion('1.8.4'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be replaced with module.botocore_at_least('1.8.4')
and the distutils call on line 316 can be removed. AnsibleAWSModule now has convenience functions for checking the boto3/botocore versions here
Thanks @Deepakkothandan! |
@s-hertel you are welcome, but I just noticed a small issue with the PR, missed it during commit. The line 329 should be |
Opening a fix @Deepakkothandan, thanks for catching that |
…#41685) * fix assign_public ip for ecs_service * used module.botocore_at_least instead of distutils
SUMMARY
ecs_service.py: "network_configuration" for "awsvpc" is missing "assign_public_ip" #41291
ISSUE TYPE
COMPONENT NAME
lib/ansible/modules/cloud/amazon/ecs_service.py
ANSIBLE VERSION