diff options
author | chalupaa <42819471+chalupaa@users.noreply.github.com> | 2019-05-08 15:33:19 -0500 |
---|---|---|
committer | Jill R <4121322+jillr@users.noreply.github.com> | 2019-05-08 13:33:19 -0700 |
commit | 05e81b28e99da067fd2de005322f9e6a320f73a4 (patch) | |
tree | 11decd484ed7254a2ca97bcdc82e2d16cb95c715 | |
parent | 22c079e4b5d0d3661aa9f6167f8d785895f6e4f8 (diff) | |
download | ansible-05e81b28e99da067fd2de005322f9e6a320f73a4.tar.gz |
Fix to allow multiple origins with origin access identity enabled (#55189)
-rw-r--r-- | lib/ansible/modules/cloud/amazon/cloudfront_distribution.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ansible/modules/cloud/amazon/cloudfront_distribution.py b/lib/ansible/modules/cloud/amazon/cloudfront_distribution.py index d51351a622..98e3727e83 100644 --- a/lib/ansible/modules/cloud/amazon/cloudfront_distribution.py +++ b/lib/ansible/modules/cloud/amazon/cloudfront_distribution.py @@ -1407,7 +1407,8 @@ class CloudFrontValidationManager(object): return None try: comment = "access-identity-by-ansible-%s-%s" % (origin.get('domain_name'), self.__default_datetime_string) - cfoai_config = dict(CloudFrontOriginAccessIdentityConfig=dict(CallerReference=self.__default_datetime_string, + caller_reference = "%s-%s" % (origin.get('domain_name'), self.__default_datetime_string) + cfoai_config = dict(CloudFrontOriginAccessIdentityConfig=dict(CallerReference=caller_reference, Comment=comment)) oai = client.create_cloud_front_origin_access_identity(**cfoai_config)['CloudFrontOriginAccessIdentity']['Id'] except Exception as e: |