Explorar o código

icinga2: Only add override.conf for buster

Philipp Fromme %!s(int64=3) %!d(string=hai) anos
pai
achega
9282f5e27e
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      icinga2/init.sls

+ 10 - 0
icinga2/init.sls

@@ -25,12 +25,22 @@ icinga2:
 
 # Add override for ExecStart to close stdio
 /etc/systemd/system/icinga2.service.d/override.conf:
+{% if grains.oscodename == "buster" %}
   file.managed:
     - source: salt://icinga2/systemd.override.conf
     - require:
       - file: /etc/systemd/system/icinga2.service.d
     - watch_in:
       - service: icinga2
+{% else %}
+  file.absent
+{% endif %}
+
+systemd-reload:
+  cmd.run:
+    - name: systemctl daemon-reload
+    - watch:
+      - file: /etc/systemd/system/icinga2.service.d/override.conf
 
 # Install plugins (official + our own)
 monitoring-plugin-pkgs: