db.tld-template.j2 749 B

12345678910111213141516171819202122232425
  1. ; zonefile for all tlds in group_vars/all/domains:
  2. $TTL 86400
  3. @ IN SOA {{bind_zonemaster.server}}. {{bind_zonemaster.email}}. (
  4. {{ansible_date_time.epoch}} ; serial
  5. 3600 ; refresh
  6. 600 ; retry
  7. 1209600 ; expire
  8. 3600) ; minimum
  9. {% set i = [1] %}
  10. {% for host in item.value.extern_dns %}
  11. @ IN NS ns{{i[0]}}
  12. ns{{i[0]}} IN A {{hostvars[host].ansible_ssh_host }}
  13. {% if i.append(i.pop() + 1) %}{% endif %}
  14. {% endfor %}
  15. {% if dns_entries_for_all_tlds is defined %}
  16. {% for entry in dns_entries_for_all_tlds %}
  17. {{entry}}
  18. {% endfor %}
  19. {% endif %}
  20. {% if "dns_entries" in item.value %}
  21. {% for entry in item.value.dns_entries %}
  22. {{entry}}
  23. {% endfor %}
  24. {% endif %}