Skip to content

Commit

Permalink
Enable AWSRetry on aws_region_info (ansible-collections#422)
Browse files Browse the repository at this point in the history
* Enable AWSRetry on aws_region_info

* changelog

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@ea740a2
  • Loading branch information
tremble authored and alinabuzachis committed Oct 6, 2023
1 parent d6802f3 commit 02cc13b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/modules/aws_region_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
'''

from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AWSRetry, ansible_dict_to_boto3_filter_list, camel_dict_to_snake_dict
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AWSRetry
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import ansible_dict_to_boto3_filter_list
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import camel_dict_to_snake_dict

try:
from botocore.exceptions import ClientError, BotoCoreError
Expand Down Expand Up @@ -86,6 +88,7 @@ def main():

try:
regions = connection.describe_regions(
aws_retry=True,
Filters=ansible_dict_to_boto3_filter_list(sanitized_filters)
)
except (BotoCoreError, ClientError) as e:
Expand Down

0 comments on commit 02cc13b

Please sign in to comment.