nsd-formula/nsd/files/default/generated-zones.conf.jinja
Georg Pfuetzenreuter 307ed12b2b
feat(zones): allow custom options and files
- allow additional configuration options in zone blocks
- allow installation of zone files from other Salt file roots

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2023-02-18 16:06:35 +01:00

18 lines
660 B
Django/Jinja

{%- from "nsd/macros.jinja" import zonefile_name with context -%}
{%- set extraopts = ['allow-notify', 'request-xfr', 'outgoing-interface'] -%}
########################################################################
# File managed by Salt at <{{ source }}>.
# Your changes will be overwritten.
########################################################################
{%- for name, config in nsd.get('zones').items() %}
zone:
name: "{{ name }}"
zonefile: "{{ nsd.zones_dir }}/{{ zonefile_name(name, config) }}"
{%- for option in extraopts %}
{%- if option in config %}
{{ option }}: {{ config[option] }}
{%- endif %}
{%- endfor %}
{%- endfor %}