Skip to content

Commit 02c39a8

Browse files
saltydkpatchback[bot]
authored andcommitted
cloudflare_dns: Update SRV record handling for Cloudflare API changes (#8948)
(cherry picked from commit 1bdf8fc)
1 parent d9d9148 commit 02c39a8

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bugfixes:
2+
- cloudflare_dns - fix changing Cloudflare SRV records (https://github.com/ansible-collections/community.general/issues/8679, https://github.com/ansible-collections/community.general/pull/8948).

plugins/modules/cloudflare_dns.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -716,12 +716,14 @@ def ensure_dns_record(self, **kwargs):
716716
"port": params['port'],
717717
"weight": params['weight'],
718718
"priority": params['priority'],
719-
"name": params['record'],
720-
"proto": params['proto'],
721-
"service": params['service']
722719
}
723720

724-
new_record = {"type": params['type'], "ttl": params['ttl'], 'data': srv_data}
721+
new_record = {
722+
"type": params['type'],
723+
"name": params['service'] + '.' + params['proto'] + '.' + params['record'],
724+
"ttl": params['ttl'],
725+
'data': srv_data,
726+
}
725727
search_value = str(params['weight']) + '\t' + str(params['port']) + '\t' + params['value']
726728
search_record = params['service'] + '.' + params['proto'] + '.' + params['record']
727729

0 commit comments

Comments
 (0)