fix(service): service is not reloaded because of failing if

This commit is contained in:
Nicolas Rodriguez 2020-08-24 17:13:11 +02:00
parent 461ce4ffcd
commit deb9cd28a8

View File

@ -19,7 +19,7 @@ prometheus-service-running-{{ name }}-unmasked:
- name: {{ service_name }}
- onlyif:
- {{ grains.kernel|lower == 'linux' }}
- systemctl list-units | grep {{ service_name }} >/dev/null 2>&1
- systemctl list-unit-files | grep {{ service_name }} >/dev/null 2>&1
- require_in:
- service: prometheus-service-running-{{ name }}
- require:
@ -33,7 +33,7 @@ prometheus-service-running-{{ name }}:
- reload_modules: true
{%- endif %}
service.running:
- onlyif: systemctl list-units | grep {{ service_name }} >/dev/null 2>&1
- onlyif: systemctl list-unit-files | grep {{ service_name }} >/dev/null 2>&1
- enable: True
- require:
- sls: {{ sls_config_file }}