From c0dea8b164d9e5dc3748a0b391829575bf9f144c Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 13 Jan 2024 16:08:22 +0100 Subject: [PATCH] cloudflare_dns: remove support for SPF records (#7782) Remove support for SPF records. --- changelogs/fragments/7782-cloudflare_dns-spf.yml | 2 ++ plugins/modules/cloudflare_dns.py | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/7782-cloudflare_dns-spf.yml diff --git a/changelogs/fragments/7782-cloudflare_dns-spf.yml b/changelogs/fragments/7782-cloudflare_dns-spf.yml new file mode 100644 index 0000000000..83e7fe79bb --- /dev/null +++ b/changelogs/fragments/7782-cloudflare_dns-spf.yml @@ -0,0 +1,2 @@ +removed_features: + - "cloudflare_dns - remove support for SPF records. These are no longer supported by CloudFlare (https://github.com/ansible-collections/community.general/pull/7782)." diff --git a/plugins/modules/cloudflare_dns.py b/plugins/modules/cloudflare_dns.py index d2bea42662..1904976440 100644 --- a/plugins/modules/cloudflare_dns.py +++ b/plugins/modules/cloudflare_dns.py @@ -148,9 +148,9 @@ options: type: description: - The type of DNS record to create. Required if O(state=present). - - Note that V(SPF) is no longer supported by CloudFlare. Support for it will be removed from community.general 9.0.0. + - Support for V(SPF) has been removed from community.general 9.0.0 since that record type is no longer supported by CloudFlare. type: str - choices: [ A, AAAA, CNAME, DS, MX, NS, SPF, SRV, SSHFP, TLSA, CAA, TXT ] + choices: [ A, AAAA, CNAME, DS, MX, NS, SRV, SSHFP, TLSA, CAA, TXT ] value: description: - The record value. @@ -674,7 +674,7 @@ class CloudflareAPI(object): if (params['type'] is None) or (params['record'] is None): self.module.fail_json(msg="You must provide a type and a record to create a new record") - if (params['type'] in ['A', 'AAAA', 'CNAME', 'TXT', 'MX', 'NS', 'SPF']): + if (params['type'] in ['A', 'AAAA', 'CNAME', 'TXT', 'MX', 'NS']): if not params['value']: self.module.fail_json(msg="You must provide a non-empty value to create this record type") @@ -869,7 +869,7 @@ def main(): state=dict(type='str', default='present', choices=['absent', 'present']), timeout=dict(type='int', default=30), ttl=dict(type='int', default=1), - type=dict(type='str', choices=['A', 'AAAA', 'CNAME', 'DS', 'MX', 'NS', 'SPF', 'SRV', 'SSHFP', 'TLSA', 'CAA', 'TXT']), + type=dict(type='str', choices=['A', 'AAAA', 'CNAME', 'DS', 'MX', 'NS', 'SRV', 'SSHFP', 'TLSA', 'CAA', 'TXT']), value=dict(type='str', aliases=['content']), weight=dict(type='int', default=1), zone=dict(type='str', required=True, aliases=['domain']),