dns.conf 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #
  2. # DNS service checks (Salt maanged)
  3. #
  4. {%- set reference_ns = salt['pillar.get']('dns-server:reference_ns') %}
  5. {%- set zones = salt['pillar.get']('dns-server:zones', {}).keys ()|sort %}
  6. ################################################################################
  7. # Internal DNS services #
  8. ################################################################################
  9. # Check DNS Anycast address
  10. object Host "dns.srv.in.ffho.net" {
  11. import "generic-dummy-host"
  12. display_name = "dns.srv.in.ffho.net"
  13. address = "10.132.251.53"
  14. address6 = "2a03:2260:2342:f251::53"
  15. vars.roles = [
  16. "dns",
  17. ]
  18. }
  19. # Check DNS anycast nodes
  20. apply Service "dns4" {
  21. import "generic-service"
  22. check_command = "dns"
  23. vars.dns_lookup = "dns.srv.in.ffho.net"
  24. vars.dns_expected_answer = "10.132.251.53"
  25. vars.dns_server = host.address
  26. assign where host.address && "dns-auth" in host.vars.roles
  27. }
  28. apply Service "dns6" {
  29. import "generic-service"
  30. check_command = "dns"
  31. vars.dns_lookup = "dns.srv.in.ffho.net"
  32. vars.dns_expected_answer = "10.132.251.53"
  33. vars.dns_server = host.address6
  34. assign where host.address6 && "dns-auth" in host.vars.roles
  35. }
  36. # Check if DNS nodes are in sync with auth server
  37. apply Service "dns_sync" {
  38. import "generic-service"
  39. check_command = "dns_sync"
  40. vars.reference_ns = "{{ reference_ns }}"
  41. vars.replica_ns = host.address
  42. vars.zones = [
  43. {%- for zone in zones %}
  44. "{{ zone }}",
  45. {%- endfor %}
  46. ]
  47. assign where host.address && "dns-auth" in host.vars.roles
  48. ignore where "dns-server-master" in host.vars.roles
  49. }
  50. ################################################################################
  51. # External DNS services #
  52. ################################################################################
  53. apply Service "dns_sync_dns01.srv.rfc2324.org" {
  54. import "generic-service"
  55. check_command = "dns_sync"
  56. vars.reference_ns = "{{ reference_ns }}"
  57. vars.replica_ns = "31.172.8.66"
  58. vars.zones = [
  59. "ffho.net",
  60. "hochstift.freifunk.net",
  61. "paderborn.freifunk.net",
  62. ]
  63. assign where "dns-server-master" in host.vars.roles
  64. }
  65. apply Service "dns_sync_ns.youngage.eu" {
  66. import "generic-service"
  67. check_command = "dns_sync"
  68. vars.reference_ns = "{{ reference_ns }}"
  69. vars.replica_ns = "5.9.142.19"
  70. vars.zones = [
  71. "ffho.net",
  72. "hochstift.freifunk.net",
  73. "paderborn.freifunk.net",
  74. ]
  75. assign where "dns-server-master" in host.vars.roles
  76. }