paulbsd-salt/states/ovh/domain.sls
Paul Lecuq 2c28b44206
All checks were successful
continuous-integration/drone/push Build is passing
updated ovh state and modules
2022-08-06 20:23:43 +02:00

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 %}