2020-08-22 06:45:15 +00:00
|
|
|
---
|
|
|
|
|
2022-04-21 04:25:27 +00:00
|
|
|
- name: "manage records for ({{ domain }})"
|
2021-12-19 03:30:46 +00:00
|
|
|
cloudflare_dns:
|
|
|
|
zone: "{{ domain }}"
|
|
|
|
record: "{{ record.name }}"
|
|
|
|
value: "{{ record.value }}"
|
|
|
|
type: "{{ record.type }}"
|
2022-04-21 04:25:27 +00:00
|
|
|
solo: "{{ 'yes' if record.state in ['present'] | default(false) else omit }}"
|
|
|
|
state: "{{ record.state }}" # don't assume / set a default, require explicit instruction
|
2021-12-19 03:30:46 +00:00
|
|
|
account_email: "{{ cf_email }}"
|
|
|
|
account_api_token: "{{ cf_token }}"
|
|
|
|
loop: "{{ records }}"
|
|
|
|
loop_control:
|
|
|
|
loop_var: record
|