1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix for cloudflare_dns SRV record and Python3 (#42914)

This fix adds correct way of comparing dict with dict while managing cloudflare_dns SRV record.

Fixes: #40445
This commit is contained in:
sevs44936 2018-07-18 06:13:16 +02:00 committed by Abhijeet Kasurde
parent 8447f25e10
commit 7dbdc8a92e

View file

@ -558,7 +558,7 @@ class CloudflareAPI(object):
if (params['priority'] is not None) and ('priority' in cur_record) and (cur_record['priority'] != params['priority']): if (params['priority'] is not None) and ('priority' in cur_record) and (cur_record['priority'] != params['priority']):
do_update = True do_update = True
if ('data' in new_record) and ('data' in cur_record): if ('data' in new_record) and ('data' in cur_record):
if (cur_record['data'] > new_record['data']) - (cur_record['data'] < new_record['data']): if (cur_record['data'] != new_record['data']):
do_update = True do_update = True
if (params['type'] == 'CNAME') and (cur_record['content'] != new_record['content']): if (params['type'] == 'CNAME') and (cur_record['content'] != new_record['content']):
do_update = True do_update = True