Ales Komarek | 882ac7b | 2014-07-14 10:47:56 +0200 | [diff] [blame] | 1 | // |
| 2 | // Do any local configuration here |
| 3 | // |
| 4 | |
| 5 | // Consider adding the 1918 zones here, if they are not used in your |
| 6 | // organization |
| 7 | //include "/etc/bind/zones.rfc1918"; |
| 8 | |
| 9 | {% for key,args in salt['pillar.get']('bind:configured_zones', {}).iteritems() -%} |
| 10 | {%- set file = salt['pillar.get']("available_zones:" + key + ":file") %} |
| 11 | {%- set masters = salt['pillar.get']("available_zones:" + key + ":masters") %} |
| 12 | zone "{{ key }}" { |
| 13 | type {{ args['type'] }}; |
| 14 | file "zones/{{ file }}"; |
| 15 | {% if args['type'] == "master" -%} |
| 16 | {% if args['notify'] -%} |
| 17 | notify yes; |
| 18 | {% else -%} |
| 19 | notify no; |
| 20 | {%- endif -%} |
| 21 | {% else -%} |
| 22 | notify no; |
| 23 | masters { {{ masters }} }; |
| 24 | {%- endif %} |
| 25 | }; |
| 26 | {% endfor %} |
| 27 | |
| 28 | logging { |
| 29 | channel "querylog" { file "/var/log/bind9/query.log"; print-time yes; }; |
| 30 | category queries { querylog; }; |
| 31 | }; |