mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-27 05:43:09 +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:
2
changelogs/fragments/10934-cloudflare-dns-srv-bug.yml
Normal file
2
changelogs/fragments/10934-cloudflare-dns-srv-bug.yml
Normal 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).
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user