named.conf.tld.j2 922 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {% for domain in domains %}
  2. zone "{{domain}}." IN {
  3. type master;
  4. file "/etc/bind/db.{{domain}}";
  5. allow-transfer {
  6. localhost;
  7. {% for host in groups['gateways'] %}
  8. {{hostvars[host].ansible_ssh_host }};
  9. {% endfor %}
  10. };
  11. };
  12. zone "servers.{{domain}}." IN {
  13. type master;
  14. file "/etc/bind/db.servers.{{domain}}";
  15. allow-transfer {
  16. localhost;
  17. {% for host in groups['gateways'] %}
  18. {{hostvars[host].ansible_ssh_host }};
  19. {% endfor %}
  20. };
  21. };
  22. zone "services.{{domain}}." IN {
  23. type master;
  24. file "/etc/bind/db.services.{{domain}}";
  25. allow-transfer {
  26. localhost;
  27. {% for host in groups['gateways'] %}
  28. {{hostvars[host].ansible_ssh_host }};
  29. {% endfor %}
  30. };
  31. };
  32. zone "knoten.{{domain}}." IN {
  33. type master;
  34. file "/etc/bind/db.knoten.{{domain}}";
  35. allow-transfer {
  36. localhost;
  37. {% for host in groups['gateways'] %}
  38. {{hostvars[host].ansible_ssh_host }};
  39. {% endfor %}
  40. };
  41. };
  42. {% endfor %}