Browse Source

icinga2: Explicitly write HostName into zones.conf.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm 3 years ago
parent
commit
c42f15137d
2 changed files with 5 additions and 4 deletions
  1. 1 0
      icinga2/init.sls
  2. 4 4
      icinga2/zones.conf

+ 1 - 0
icinga2/init.sls

@@ -78,6 +78,7 @@ sudo:
     - source:
       - salt://icinga2/zones.conf.H_{{ grains.id }}
       - salt://icinga2/zones.conf
+    - template: jinja
     - require:
       - pkg: icinga2
     - watch_in:

+ 4 - 4
icinga2/zones.conf

@@ -2,12 +2,12 @@
 # zones.conf (Salt managed)
 #
 
-object Endpoint NodeName {
-	host = NodeName
+object Endpoint "{{ grains.id }}"  {
+	host = "{{ grains.id }}"
 }
 
-object Zone ZoneName {
-	endpoints = [ NodeName ]
+object Zone "{{ grains.id }}" {
+	endpoints = [ "{{ grains.id }}" ]
 	parent = "master"
 }