mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-29 00:17:35 +00:00
cloudflare_dns: rollback validation for SRV records (#10937)
* cloudflare_dns: rollback validation for SRV records * add changelog frag
This commit is contained in:
parent
9dedd77459
commit
2bd44584d3
2 changed files with 8 additions and 3 deletions
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).
|
||||
|
|
@ -927,7 +927,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']),
|
||||
],
|
||||
|
|
@ -940,8 +940,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue