named.conf.local 823 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // Zone configuration for master name server (Salt managed)
  3. //
  4. //
  5. // ACLs
  6. //
  7. {% for acl_name, acl_config in salt['pillar.get']('dns-server:acls', {}).items ()|sort %}
  8. acl {{ acl_name }} {
  9. {%- for entry in acl_config['entries'] %}
  10. {{ entry }};
  11. {%- endfor %}
  12. };
  13. {% endfor %}
  14. //
  15. // Zones
  16. //
  17. {%- set defaults = salt['pillar.get']('dns-server:zone_defaults', {}) %}
  18. {% for zone, zone_config in salt['pillar.get']('dns-server:zones', {}).items ()|sort %}
  19. {%- set allow_transfer = zone_config.get ('allow-transfer', defaults.get ('allow-transfer')) %}
  20. // {{ zone_config.get ('desc', zone ) }}
  21. zone "{{ zone }}" {
  22. type {{ zone_config.get ('type', defaults.get ('type')) }};
  23. file "{{ zone_config.get ('file') }}";
  24. {%- if allow_transfer %}
  25. allow-transfer { {{ allow_transfer }} };
  26. {%- endif %}
  27. };
  28. {% endfor %}