Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugins/modules/cloudflare_dns: Add CAA record support #7399

Merged
merged 7 commits into from
Oct 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PEP8 compliance
  • Loading branch information
H4ckd4ddy committed Oct 16, 2023
commit e68158edb979ade55c4004832739b53a9368bcab
6 changes: 3 additions & 3 deletions plugins/modules/cloudflare_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,9 +805,9 @@ def ensure_dns_record(self, **kwargs):
# As Cloudflare API cannot filter record containing quotes
# CAA records must be compared localy
if params['type'] == 'CAA':
for record in records:
if record['data']['flags'] == caa_data['flags'] and record['data']['tag'] == caa_data['tag'] and record['data']['value'] == caa_data['value']:
return record, self.changed
for rr in records:
if rr['data']['flags'] == caa_data['flags'] and rr['data']['tag'] == caa_data['tag'] and rr['data']['value'] == caa_data['value']:
return rr, self.changed
else:
self.module.fail_json(msg="More than one record already exists for the given attributes. That should be impossible, please open an issue!")
# record already exists, check if it must be updated
Expand Down