|
|
|
|
|
|
|
|
{%- for zone_name, zone in data.data.get('records', {}).iteritems() %} |
|
|
{%- for zone_name, zone in data.data.get('records', {}).iteritems() %} |
|
|
{%- for record in zone %} |
|
|
{%- for record in zone %} |
|
|
|
|
|
|
|
|
ddns_update_{{ zone_name }}_{{ loop.index }}: |
|
|
|
|
|
runner.ddns.update: |
|
|
|
|
|
|
|
|
ddns_record_{{ zone_name }}_{{ loop.index }}: |
|
|
|
|
|
runner.ddns.create: |
|
|
- args: |
|
|
- args: |
|
|
- zone: {{ zone_name }} |
|
|
- zone: {{ zone_name }} |
|
|
- name: {{ record['name'] }} |
|
|
- name: {{ record['name'] }} |
|
|
|
|
|
|
|
|
- keyfile: /etc/salt/ddns.keyring |
|
|
- keyfile: /etc/salt/ddns.keyring |
|
|
- nameserver: {{ ddns.get('server', '127.0.0.1') }} |
|
|
- nameserver: {{ ddns.get('server', '127.0.0.1') }} |
|
|
- timeout: 10 |
|
|
- timeout: 10 |
|
|
- replace: True |
|
|
|
|
|
- keyalgorithm: 'HMAC-MD5.SIG-ALG.REG.INT' |
|
|
- keyalgorithm: 'HMAC-MD5.SIG-ALG.REG.INT' |
|
|
{%- endfor %} |
|
|
{%- endfor %} |
|
|
{%- endfor %} |
|
|
{%- endfor %} |