22 lines
769 B
Plaintext
22 lines
769 B
Plaintext
---
|
|
{%- from "ovh/map.jinja" import ovh with context %}
|
|
{%- for domain, values in ovh.domain.zones.items() %}
|
|
{%- for record in values.records %}
|
|
ovh-domain-{{ domain }}-{{ "{}-{}-{}".format(record.name, record.type, record.target)|md5 }}:
|
|
ovhapi.domain_record_present:
|
|
- name: ovh-domain-{{ domain }}-{{ "{}-{}-{}".format(record.name, record.type, record.target)|md5 }}
|
|
- zone: {{ domain }}
|
|
- recordname: "{{ record.name }}"
|
|
- recordtype: {{ record.type }}
|
|
- target: {{ record.target }}
|
|
- ttl: {{ record.ttl|default(0) }}
|
|
{%- endfor %}
|
|
{%- endfor %}
|
|
|
|
{%- for domain in ovh.domain.zones.keys() %}
|
|
ovh-domain-refresh-{{ domain }}:
|
|
ovhapi.domain_zone_refresh:
|
|
- name: ovh-domain-refresh-{{ domain }}
|
|
- zone: {{ domain }}
|
|
{%- endfor %}
|