1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00

[PR #10937/2bd44584 backport][stable-11] cloudflare_dns: rollback validation for SRV records (#10938)

cloudflare_dns: rollback validation for SRV records (#10937)

* cloudflare_dns: rollback validation for SRV records

* add changelog frag

(cherry picked from commit 2bd44584d3)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2025-10-18 09:47:57 +02:00 committed by GitHub
parent 3868664046
commit 3a2ce4add5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

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