From 25218e6843d5e6f1d95d4d131d1346c43ee8f855 Mon Sep 17 00:00:00 2001 From: Sloane Hertel Date: Tue, 31 Jul 2018 15:50:15 -0400 Subject: [PATCH] Fix dualstack without s3_url (#43510) --- lib/ansible/modules/cloud/amazon/aws_s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/aws_s3.py b/lib/ansible/modules/cloud/amazon/aws_s3.py index 5d22853d4d1..367f89c1687 100644 --- a/lib/ansible/modules/cloud/amazon/aws_s3.py +++ b/lib/ansible/modules/cloud/amazon/aws_s3.py @@ -759,7 +759,7 @@ def main(): if not s3_url and 'S3_URL' in os.environ: s3_url = os.environ['S3_URL'] - if dualstack and 'amazonaws.com' not in s3_url: + if dualstack and s3_url is not None and 'amazonaws.com' not in s3_url: module.fail_json(msg='dualstack only applies to AWS S3') if dualstack and not module.botocore_at_least('1.4.45'):