Browse Source

Icinga2: Read reference NS from pillar

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 4 years ago
parent
commit
cf9fab7730
2 changed files with 5 additions and 3 deletions
  1. 1 0
      icinga2/init.sls
  2. 4 3
      icinga2/services/dns.conf

+ 1 - 0
icinga2/init.sls

@@ -161,6 +161,7 @@ ffho-plugins:
     - user: root
     - group: root
     - clean: true
+    - template: jinja
     - require:
       - pkg: icinga2
     - watch_in:

+ 4 - 3
icinga2/services/dns.conf

@@ -1,6 +1,7 @@
 #
 # DNS service checks (Salt maanged)
 #
+{%- set reference_ns = salt['pillar.get']('dns-server:reference_ns') %}
 
 ################################################################################
 #                            Internal DNS services                             #
@@ -50,7 +51,7 @@ apply Service "dns_sync" {
 	import "generic-service"
 
 	check_command = "dns_sync"
-	vars.reference_ns = "80.70.180.53"
+	vars.reference_ns = "{{ reference_ns }}"
 	vars.replica_ns = host.address
 	vars.zones = [
 		"ffho.net",
@@ -71,7 +72,7 @@ apply Service "dns_sync_dns01.srv.rfc2324.org" {
 	import "generic-service"
 
 	check_command = "dns_sync"
-	vars.reference_ns = "80.70.180.53"
+	vars.reference_ns = "{{ reference_ns }}"
 	vars.replica_ns = "31.172.8.66"
 	vars.zones = [
 		"ffho.net",
@@ -86,7 +87,7 @@ apply Service "dns_sync_ns.youngage.eu" {
 	import "generic-service"
 
 	check_command = "dns_sync"
-	vars.reference_ns = "80.70.180.53"
+	vars.reference_ns = "{{ reference_ns }}"
 	vars.replica_ns = "5.9.142.19"
 	vars.zones = [
 		"ffho.net",