{% macro view(views) %} {% for view in views if views 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 -}} {{ ('match-clients {\n' + functions.simple_item_list(view.match_clients) + '};\n') if view.match_clients is defined and view.match_clients -}} {{ ('match-destinations {\n' + functions.simple_item_list(view.match_destinations) + '};\n') if view.match_destinations is defined and view.match_destinations -}} {% if view.options is defined and view.options %} {% from 'named.conf.options.j2' import options with context %} {{ options(view.options) -}} {% endif %} {% if view.acl is defined and view.acl %} {% from 'named.conf.acl.j2' import acl with context %} {{ acl(view.acl) -}} {% endif %} {% if view.zones is defined and view.zones %} {% from 'named.conf.zone.j2' import zones with context %} {{ zones(view.zones) -}} {% endif %} {% if view.controls is defined and view.controls %} {% from 'named.conf.controls.j2' import controls with context %} {{ controls(view.controls) -}} {% endif %} {% if view.include is defined and view.include %} {% from 'named.conf.include.j2' import include with context %} {{ include(view.include) -}} {% endif %} {% if view.dlz is defined and view.dlz %} {% from 'named.conf.dlz.j2' import dlz with context %} {{ dlz(view.dlz) -}} {% endif %} {% if view.dnssec_policy is defined and view.dnssec_policy %} {% from 'named.conf.dnssec-policy.j2' import dnssec_policy with context %} {{ dnssec_policy(view.dnssec_policy) -}} {% endif %} {% if view.dyndb is defined and view.dyndb %} {% from 'named.conf.dyndb.j2' import dyndb with context %} {{ dyndb(view.dyndb) -}} {% endif %} {% if view.http is defined and view.http %} {% from 'named.conf.http.j2' import http with context %} {{ http(view.http) -}} {% endif %} {% if view.keylist is defined and view.keylist %} {% from 'named.conf.key.j2' import keylist with context %} {{ keylist(view.keylist) -}} {% endif %} {% if view.logging is defined and view.logging %} {% from 'named.conf.logging.j2' import logging with context %} {{ logging(view.logging) -}} {% endif %} {% if view.parental_agents is defined and view.parental_agents %} {% from 'named.conf.parental-agents.j2' import parental_agents with context %} {{ parental_agents(view.parental_agents) -}} {% endif %} {% if view.primaries is defined and view.primaries %} {% from 'named.conf.primaries.j2' import primaries with context %} {{ primaries(view.primaries) -}} {% endif %} {% if view.server is defined and view.server %} {% from 'named.conf.server.j2' import server with context %} {{ server(view.server) -}} {% endif %} {% if view.statistics_channels is defined and view.statistics_channels %} {% from 'named.conf.statistics-channels.j2' import statistics_channels with context %} {{ statistics_channels(view.statistics_channels) -}} {% endif %} {% if view.tls is defined and view.tls %} {% from 'named.conf.tls.j2' import tls with context %} {{ tls(view.tls) -}} {% endif %} {% if view.trust_anchors is defined and view.trust_anchors %} {% from 'named.conf.trust-anchors.j2' import trust_anchors with context %} {{ trust_anchors(view.trust_anchors) -}} {% endif %} {% endfilter %} };{% endfor %}{% endmacro %}