|
|
|
@ -1092,6 +1092,7 @@ web_acl_id:
|
|
|
|
|
from ansible.module_utils._text import to_text, to_native
|
|
|
|
|
from ansible.module_utils.aws.core import AnsibleAWSModule
|
|
|
|
|
from ansible.module_utils.aws.cloudfront_facts import CloudFrontFactsServiceManager
|
|
|
|
|
from ansible.module_utils.common.dict_transformations import recursive_diff
|
|
|
|
|
from ansible.module_utils.ec2 import get_aws_connection_info
|
|
|
|
|
from ansible.module_utils.ec2 import ec2_argument_spec, boto3_conn, compare_aws_tags
|
|
|
|
|
from ansible.module_utils.ec2 import camel_dict_to_snake_dict, ansible_dict_to_boto3_tag_list
|
|
|
|
@ -1146,24 +1147,6 @@ def ansible_list_to_cloudfront_list(list_items=None, include_quantity=True):
|
|
|
|
|
return result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def recursive_diff(dict1, dict2):
|
|
|
|
|
left = dict((k, v) for (k, v) in dict1.items() if k not in dict2)
|
|
|
|
|
right = dict((k, v) for (k, v) in dict2.items() if k not in dict1)
|
|
|
|
|
for k in (set(dict1.keys()) & set(dict2.keys())):
|
|
|
|
|
if isinstance(dict1[k], dict) and isinstance(dict2[k], dict):
|
|
|
|
|
result = recursive_diff(dict1[k], dict2[k])
|
|
|
|
|
if result:
|
|
|
|
|
left[k] = result[0]
|
|
|
|
|
right[k] = result[1]
|
|
|
|
|
elif dict1[k] != dict2[k]:
|
|
|
|
|
left[k] = dict1[k]
|
|
|
|
|
right[k] = dict2[k]
|
|
|
|
|
if left or right:
|
|
|
|
|
return left, right
|
|
|
|
|
else:
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def create_distribution(client, module, config, tags):
|
|
|
|
|
try:
|
|
|
|
|
if not tags:
|
|
|
|
|