eef721d276
This also allows the playbook to be idempotent.
45 lines
1.3 KiB
Django/Jinja
45 lines
1.3 KiB
Django/Jinja
# NSD configuration, automatically generated by Ansible.
|
|
# Do not edit by hand!
|
|
#
|
|
# This file is included by the main configuration file, and contains
|
|
# definitions for all zones (primary and secondary) and TSIG keys.
|
|
|
|
## TSIG keys ##
|
|
{% for key in nsd_tsig_keys|default([]) %}
|
|
key:
|
|
name: "{{ key.tsig_keyname }}"
|
|
secret: "{{ key.tsig_secret }}"
|
|
algorithm: "{{ key.tsig_algorithm }}"
|
|
|
|
{% endfor %}
|
|
|
|
|
|
## Primary zones ##
|
|
|
|
{% for zone in nsd_primary_zones|default([]) %}
|
|
# Primary zone definition for {{ zone.zone_name }}
|
|
zone:
|
|
name: "{{ zone.zone_name }}"
|
|
zonefile: "{{ primary_zones_dir }}/{{ zone.zone_filename }}"
|
|
{% for slave in zone.slaves|default([]) %}
|
|
notify: {{ slave.ip }} "{{ slave.tsig_key|default('NOKEY') }}"
|
|
provide-xfr: {{ slave.ip }} "{{ slave.tsig_key|default('NOKEY') }}"
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
## Secondary zones ##
|
|
|
|
{% for zone in nsd_secondary_zones|default([]) %}
|
|
# Secondary zone definition for {{ zone.zone_name }}
|
|
zone:
|
|
name: "{{ zone.zone_name }}"
|
|
zonefile: "{{ secondary_zones_dir }}/{{ zone.zone_name }}"
|
|
{% for master in zone.masters|default([]) %}
|
|
allow-notify: {{ master.ip }} "{{ master.tsig_key|default('NOKEY') }}"
|
|
request-xfr: AXFR {{ master.ip }} "{{ master.tsig_key|default('NOKEY') }}"
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|