When I set configured_views in my pillar file the bind.config state by calling named.local.jinja template doesn't update properly named.conf.local. In fact, in addition to correctly put zone block in view block, bind.config copy a second time zone block at the top of the file. And you get the following error from bind9
/etc/bind/named.conf.local:11: when using 'view' statements, all zones must be in views
loading configuration: failure
To get able to use views I put the zone macro in if statement
When I set
configured_views
in my pillar file the bind.config state by calling named.local.jinja template doesn't update properly named.conf.local. In fact, in addition to correctly put zone block in view block, bind.config copy a second time zone block at the top of the file. And you get the following error from bind9To get able to use views I put the zone macro in if statement
https://github.com/saltstack-formulas/bind-formula/blob/master/bind/files/named.conf.local.jinja
line 92 to 94
{%- if salt['pillar.get']('bind:configured_views', {}) is not defined %}
{{ zone(key, args, file, masters) }}
{%- endif %}