demacro zone and view
This commit is contained in:
@@ -54,10 +54,8 @@ options {
|
||||
{% include 'named.conf.trust-anchors.j2' %}
|
||||
{% endif %}
|
||||
{% if item.zones is defined and item.zones %}
|
||||
{% from 'named.conf.zone.j2' import zones with context %}
|
||||
{{ zones(item.zones) }}
|
||||
{% include 'named.conf.zone.j2' %}
|
||||
{% endif %}
|
||||
{% if item.view is defined and item.view %}
|
||||
{% from 'named.conf.view.j2' import view with context %}
|
||||
{{ view(item.view) }}
|
||||
{% include 'named.conf.view.j2' %}
|
||||
{% endif %}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{% macro view(views) %}
|
||||
{% for view in views if views is iterable %}
|
||||
{% for view in item.view if item.view is iterable %}
|
||||
view {{ view.name }} {
|
||||
{% filter indent(bind9_config_indent, true) %}
|
||||
{{ ('match-recursive-only ' + functions.named_boolean(view.match_recursive_only) + ';\n') if view.match_recursive_only is defined -}}
|
||||
@@ -75,4 +74,4 @@ view {{ view.name }} {
|
||||
{{ trust_anchors(view.trust_anchors) -}}
|
||||
{% endif %}
|
||||
{% endfilter %}
|
||||
};{% endfor %}{% endmacro %}
|
||||
};{% endfor %}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Zones Macro
|
||||
{% macro zones(zones) -%}
|
||||
{% for zone in zones %}
|
||||
{% for zone in item.zones %}
|
||||
zone "{{ zone.name }}" {
|
||||
{% filter indent(bind9_config_indent, true) %}
|
||||
# Zone {{ zone.name }} type {{ zone.type }}
|
||||
@@ -159,4 +158,3 @@ parental-source-v6 {{ zone.parental_source_v6.address -}}
|
||||
};
|
||||
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user