mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-26 21:33:12 +00:00
cloudflare_dns: rollback validation for CAA records (#10956)
* cloudflare_dns: rollback validation for CAA records * add changelog frag
This commit is contained in:
@@ -929,7 +929,7 @@ def main():
|
||||
('state', 'absent', ['record']),
|
||||
('type', 'SRV', ['proto', 'service']),
|
||||
('type', 'TLSA', ['proto', 'port']),
|
||||
('type', 'CAA', ['flag', 'tag', 'value']),
|
||||
('type', 'CAA', ['flag', 'tag']),
|
||||
],
|
||||
required_together=[
|
||||
('account_api_key', 'account_email'),
|
||||
@@ -961,8 +961,11 @@ def main():
|
||||
module.fail_json(msg="For TLSA records the params cert_usage, selector, hash_type and value all need to be defined, or not at all.")
|
||||
|
||||
if module.params['type'] == 'CAA':
|
||||
if not module.params['value'] == '':
|
||||
module.fail_json(msg="For CAA records the params flag, tag and value all need to be defined.")
|
||||
if not ((module.params['flag'] is not None and module.params['tag'] is not None
|
||||
and not (module.params['value'] is None or module.params['value'] == ''))
|
||||
or (module.params['flag'] is None and module.params['tag'] is None
|
||||
and (module.params['value'] is None or module.params['value'] == ''))):
|
||||
module.fail_json(msg="For CAA records the params flag, tag and value all need to be defined, or not at all.")
|
||||
|
||||
if module.params['type'] == 'DS':
|
||||
if not ((module.params['key_tag'] is not None and module.params['algorithm'] is not None and module.params['hash_type'] is not None
|
||||
|
||||
Reference in New Issue
Block a user