cloudflare_dns: rollback validation for SRV records (#10937)
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.17) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.17+py3.10) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.17+py3.12) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.17+py3.7) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+alpine319+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+alpine319+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+alpine319+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+fedora39+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+fedora39+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+fedora39+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+ubuntu2004+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+ubuntu2004+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+ubuntu2004+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run

* cloudflare_dns: rollback validation for SRV records

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-10-18 20:43:46 +13:00 committed by GitHub
commit 2bd44584d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- cloudflare_dns - roll back changes to SRV record validation (https://github.com/ansible-collections/community.general/issues/10934, https://github.com/ansible-collections/community.general/pull/10937).

View file

@ -927,7 +927,7 @@ def main():
required_if=[ required_if=[
('state', 'present', ['record', 'type', 'value']), ('state', 'present', ['record', 'type', 'value']),
('state', 'absent', ['record']), ('state', 'absent', ['record']),
('type', 'SRV', ['proto', 'service', 'value']), ('type', 'SRV', ['proto', 'service']),
('type', 'TLSA', ['proto', 'port']), ('type', 'TLSA', ['proto', 'port']),
('type', 'CAA', ['flag', 'tag', 'value']), ('type', 'CAA', ['flag', 'tag', 'value']),
], ],
@ -940,8 +940,11 @@ def main():
) )
if module.params['type'] == 'SRV': if module.params['type'] == 'SRV':
if not module.params['value'] == '': if not ((module.params['weight'] is not None and module.params['port'] is not None
module.fail_json(msg="For SRV records the params weight, port and value all need to be defined.") and not (module.params['value'] is None or module.params['value'] == ''))
or (module.params['weight'] is None and module.params['port'] is None
and (module.params['value'] is None or module.params['value'] == ''))):
module.fail_json(msg="For SRV records the params weight, port and value all need to be defined, or not at all.")
if module.params['type'] == 'SSHFP': if module.params['type'] == 'SSHFP':
if not ((module.params['algorithm'] is not None and module.params['hash_type'] is not None if not ((module.params['algorithm'] is not None and module.params['hash_type'] is not None