mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
[PR #10956/4c7be8f2 backport][stable-11] cloudflare_dns: rollback validation for CAA records (#10957)
cloudflare_dns: rollback validation for CAA records (#10956)
* cloudflare_dns: rollback validation for CAA records
* add changelog frag
(cherry picked from commit 4c7be8f268)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
5e326a25a4
commit
7ef0705984
2 changed files with 8 additions and 3 deletions
2
changelogs/fragments/10934-cloudflare-dns-caa-bug.yml
Normal file
2
changelogs/fragments/10934-cloudflare-dns-caa-bug.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- cloudflare_dns - roll back changes to CAA record validation (https://github.com/ansible-collections/community.general/issues/10934, https://github.com/ansible-collections/community.general/pull/10956).
|
||||
|
|
@ -931,7 +931,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'),
|
||||
|
|
@ -963,8 +963,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue