2020-05-12 19:57:32 +00:00
|
|
|
---
|
|
|
|
- name: Create DNS records
|
2021-02-25 20:14:35 +00:00
|
|
|
cloudflare_dns:
|
|
|
|
api_token: "{{ cloudflare_dns_api_token }}"
|
|
|
|
zone: "{{ item.zone | default(cloudflare_dns_default_zone) }}"
|
2020-05-12 19:57:32 +00:00
|
|
|
record: "{{ item.record | default(omit) }}"
|
|
|
|
type: "{{ item.type | default(omit) }}"
|
2020-05-22 19:57:24 +00:00
|
|
|
solo: "{{ item.solo | default(omit) }}"
|
2020-05-12 19:57:32 +00:00
|
|
|
value: "{{ item.value | default(omit) }}"
|
|
|
|
state: "{{ item.state | default('present') }}"
|
2021-02-25 20:14:35 +00:00
|
|
|
loop: "{{ cloudflare_dns_records + cloudflare_dns_records_extra }}"
|
2020-05-12 19:57:32 +00:00
|
|
|
loop_control:
|
2021-02-25 20:14:35 +00:00
|
|
|
label: "{{ item.zone | default(cloudflare_dns_default_zone) }}:{{ item.record | default('@') }}"
|
|
|
|
delegate_to: "{{ cloudflare_dns_delegate_to }}"
|