fix(systemd): ensure systemd detects new service

This commit is contained in:
N 2019-06-23 13:55:08 +01:00
parent a13dd03af1
commit 149dd817f2
No known key found for this signature in database
GPG Key ID: 55A292EAB4E54067
2 changed files with 6 additions and 2 deletions

View File

@ -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 %}

View File

@ -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