1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/legacy/roles/test_cloudflare_dns/tasks/main.yml
Andreas Olsson 6d772874f9 Add SSHFP and TLSA records to cloudflare_dns module (#44011)
* Update cloudflare_dns account link

* Add SSHFP and TLSA records to cloudflare_dns module

These are record types which Cloudflare recently added support
for. They both go well together with DNSSEC.

Technically it's a bit of a simplification to use the hash_type
parameter for TLSA records. Yet, it fits with all the real world usage
I have seen, and it keeps the module from sprawling too much.

Related to #43803
2018-08-15 17:30:33 +02:00

66 lines
1.7 KiB
YAML

---
- name: "Test: no args"
cloudflare_dns:
ignore_errors: true
register: cloudflare_dns
- name: "Validate: no args"
assert:
that:
- cloudflare_dns is failed
- "cloudflare_dns.msg.find('missing required arguments: ') != -1"
- name: "Test: only credentials"
cloudflare_dns:
account_email: "{{ cloudflare_email }}"
account_api_token: "{{ cloudflare_api_token }}"
ignore_errors: true
register: cloudflare_dns
- name: "Validate: only credentials"
assert:
that:
- cloudflare_dns is failed
- "cloudflare_dns.msg.find('missing required arguments: ') != -1"
- name: "Test: credentials and zone"
cloudflare_dns:
account_email: "{{ cloudflare_email }}"
account_api_token: "{{ cloudflare_api_token }}"
zone: "{{ cloudflare_zone }}"
ignore_errors: true
register: cloudflare_dns
- name: "Validate: credentials and zone"
assert:
that:
- cloudflare_dns is failed
- "cloudflare_dns.msg.find('but all of the following are missing: ') != -1"
- name: "Test: credentials, zone and type"
cloudflare_dns:
account_email: "{{ cloudflare_email }}"
account_api_token: "{{ cloudflare_api_token }}"
zone: "{{ cloudflare_zone }}"
type: TXT
ignore_errors: true
register: cloudflare_dns
- name: "Validate: credentials, zone and type"
assert:
that:
- cloudflare_dns is failed
- "cloudflare_dns.msg.find('but all of the following are missing: ') != -1"
######## record tests #################
- include: a_record.yml
- include: aaaa_record.yml
- include: cname_record.yml
- include: txt_record.yml
- include: ns_record.yml
- include: spf_record.yml
- include: mx_record.yml
- include: srv_record.yml
- include: sshfp_record.yml
- include: tlsa_record.yml