fix(service): service is not reloaded because of failing if
This commit is contained in:
parent
461ce4ffcd
commit
deb9cd28a8
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user