Просмотр исходного кода

Icinga2: Check sync for all zones configured in pillar.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 4 лет назад
Родитель
Сommit
061b29df63
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      icinga2/services/dns.conf

+ 4 - 3
icinga2/services/dns.conf

@@ -2,6 +2,7 @@
 # DNS service checks (Salt maanged)
 #
 {%- set reference_ns = salt['pillar.get']('dns-server:reference_ns') %}
+{%- set zones = salt['pillar.get']('dns-server:zones', {}).keys ()|sort %}
 
 ################################################################################
 #                            Internal DNS services                             #
@@ -54,9 +55,9 @@ apply Service "dns_sync" {
 	vars.reference_ns = "{{ reference_ns }}"
 	vars.replica_ns = host.address
 	vars.zones = [
-		"ffho.net",
-		"132.10.in-addr.arpa",
-		"30.172.in-addr.arpa",
+{%- for zone in zones %}
+		"{{ zone }}",
+{%- endfor %}
 	]
 
 	assign where host.address && "dns-auth" in host.vars.roles