feat(reload/enable): add options for services

This commit is contained in:
Michael Schmitt 2022-08-26 17:58:25 +09:00
parent d5cfeb0d80
commit 81fe75f299
No known key found for this signature in database
GPG Key ID: 5145CC5841E00C15
2 changed files with 6 additions and 1 deletions

View File

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

View File

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