paulbsd-salt/states/ovh/domain.sls

14 lines
574 B
Plaintext
Raw Normal View History

2020-07-10 00:58:55 +02:00
---
{%- 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 %}