diff --git a/pillar.example b/pillar.example index b193b3f..441a51a 100644 --- a/pillar.example +++ b/pillar.example @@ -126,6 +126,10 @@ prometheus: service: args: web.listen-address: 0.0.0.0:9090 + # Enable the service on startup (default: true) + enable: true + # Reload service if changes occur instead of restarting (default: false) + reload: false config: # yamllint disable-line rule:line-length # ref https://raw.githubusercontent.com/prometheus/prometheus/release-2.10/config/testdata/conf.good.yml diff --git a/prometheus/service/running.sls b/prometheus/service/running.sls index 62bb86b..026beab 100644 --- a/prometheus/service/running.sls +++ b/prometheus/service/running.sls @@ -33,7 +33,8 @@ prometheus-service-running-{{ name }}-unmasked: prometheus-service-running-{{ name }}: service.running: - - enable: True + - enable: {{ p.pkg.component[name]['service'].get('enable', True) }} + - reload: {{ p.pkg.component[name]['service'].get('reload', False) }} - require: - sls: {{ sls_config_file }} {%- if grains.kernel|lower == 'linux' %}