Browse Source

icinga2: Evaluate commands.s/ files are jinja templates and deploy ssl_cert check only on jessie nodes.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm 6 years ago
parent
commit
b965ff4412
2 changed files with 3 additions and 0 deletions
  1. 2 0
      icinga2/commands.d/ssl_cert.conf
  2. 1 0
      icinga2/init.sls

+ 2 - 0
icinga2/commands.d/ssl_cert.conf

@@ -2,6 +2,7 @@
 # Old Icinga2 doesn't ship with check command for ssl_cert check
 #
 
+{%- if grains['oscodename'] == 'jessie' %}
 object CheckCommand "ssl_cert" {
 	import "plugin-check-command"
 	command = [ PluginDir + "/check_ssl_cert" ]
@@ -26,3 +27,4 @@ object CheckCommand "ssl_cert" {
 		"-d" = "$ssl_cert_d$"
 	}
 }
+{%- endif %}

+ 1 - 0
icinga2/init.sls

@@ -129,6 +129,7 @@ ffho-plugins:
 /etc/icinga2/commands.d:
   file.recurse:
     - source: salt://icinga2/commands.d
+    - template: jinja
     - file_mode: 644
     - dir_mode: 755
     - user: root