Merge pull request #49 from noelmcloughlin/service

fix(state): dangling servicename
This commit is contained in:
N 2020-11-12 09:38:44 +00:00 committed by GitHub
commit cb2a565d98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,22 +24,22 @@ prometheus-service-running-{{ name }}-unmasked:
- require: - require:
- sls: {{ sls_config_file }} - sls: {{ sls_config_file }}
- file: prometheus-config-file-etc-file-directory - file: prometheus-config-file-etc-file-directory
{%- endif %} {%- if p.wanted.firewall %}
prometheus-service-running-{{ name }}:
{%- if grains.kernel|lower == 'linux' and p.wanted.firewall %}
pkg.installed: pkg.installed:
- name: firewalld - name: firewalld
- reload_modules: true - reload_modules: true
{%- endif %} {%- endif %}
{%- endif %}
prometheus-service-running-{{ name }}:
service.running: service.running:
- names:
- {{ service_name }}
- enable: True - enable: True
- require: - require:
- sls: {{ sls_config_file }} - sls: {{ sls_config_file }}
{%- if grains.kernel|lower == 'linux' %} {%- if grains.kernel|lower == 'linux' %}
- onlyif: systemctl list-unit-files | grep {{ service_name }} >/dev/null 2>&1 - onlyif: systemctl list-unit-files | grep {{ service_name }} >/dev/null 2>&1
- names:
- {{ service_name }}
{%- if p.wanted.firewall %} {%- if p.wanted.firewall %}
- firewalld - firewalld
firewalld.present: firewalld.present: