From 149dd817f2e3cd27498f52737e962ae22a5f4f1e Mon Sep 17 00:00:00 2001 From: N Date: Sun, 23 Jun 2019 13:55:08 +0100 Subject: [PATCH] fix(systemd): ensure systemd detects new service --- prometheus/archive/install.sls | 4 ++++ prometheus/service/running.sls | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/prometheus/archive/install.sls b/prometheus/archive/install.sls index 6b7b1fe0..8548b6d4 100644 --- a/prometheus/archive/install.sls +++ b/prometheus/archive/install.sls @@ -76,6 +76,10 @@ prometheus-archive-install-{{ name }}-managed-service: - require: - file: prometheus-archive-install-{{ name }}-file-directory - file: prometheus-config-file-basedir-file-directory + cmd.run: + - name: systemctl daemon-reload + - require: + - file: prometheus-archive-install-{{ name }}-managed-service {%- endif %} {%- endif %} diff --git a/prometheus/service/running.sls b/prometheus/service/running.sls index 2cec36c2..ec7a808d 100644 --- a/prometheus/service/running.sls +++ b/prometheus/service/running.sls @@ -38,10 +38,10 @@ prometheus-service-running-{{ name }}-service-running: service.running: - name: {{ name }} - enable: True - {%- if name in prometheus.config %} + {%- if name in prometheus.config %} - watch: - file: prometheus-config-file-{{ name }}-file-managed - {%- endif %} + {%- endif %} - require: - service: prometheus-service-running-{{ name }}-service-unmasked - file: prometheus-config-file-var-file-directory