mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-02 22:39:09 -07:00
cloudflare_dns: Fix setting SRV records with a root level entry (#5972)
* cloudflare_dns: Fix setting SRV records with a root level entry
* cloudflare_dns: Remove the part which deletes the zone from the SRV record name
The cloudflare API accepts the record name + zone name to be sent. Removing that, will guarantee the module to be idempotent even though that line was added ~7 years ago for that specific reason: 7477fe5141
It seems the most logical explanition is that Cloudflare changed their API response somewhere over the last 7 years.
* cloudflare_dns: Update the changelog fragment
This commit is contained in:
parent
810f3b50fc
commit
094dc6b69c
2 changed files with 5 additions and 1 deletions
|
@ -694,10 +694,11 @@ class CloudflareAPI(object):
|
|||
"port": params['port'],
|
||||
"weight": params['weight'],
|
||||
"priority": params['priority'],
|
||||
"name": params['record'][:-len('.' + params['zone'])],
|
||||
"name": params['record'],
|
||||
"proto": params['proto'],
|
||||
"service": params['service']
|
||||
}
|
||||
|
||||
new_record = {"type": params['type'], "ttl": params['ttl'], 'data': srv_data}
|
||||
search_value = str(params['weight']) + '\t' + str(params['port']) + '\t' + params['value']
|
||||
search_record = params['service'] + '.' + params['proto'] + '.' + params['record']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue