saltstack-formulas / bind-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
29 stars 117 forks source link

[UPDATE Request] bind.config #109

Closed baptiste-dauphin closed 6 years ago

baptiste-dauphin commented 6 years ago

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

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 %}

baptiste-dauphin commented 6 years ago

I didn't read properly "notes" section : When using views all zones must be configured in views! I close.