prometheus-formula/prometheus/service/running.sls
N 1f86f4a27c
feat(archives): support for archives file format
BREAKING CHANGE: the parameter `pkg` is now a dictionary. References
 to `prometheus.pkg` should be changed to `prometheus.pkg.name`.
2019-06-15 01:52:59 +01:00

31 lines
922 B
Plaintext

# -*- coding: utf-8 -*-
# vim: ft=sls
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- set sls_config_args = tplroot ~ '.config.args' %}
{%- set sls_config_file = tplroot ~ '.config.file' %}
{%- from tplroot ~ "/map.jinja" import prometheus with context %}
include:
- {{ sls_config_args }}
- {{ sls_config_file }}
prometheus-service-running-service-unmasked:
service.unmasked:
- name: {{ prometheus.service.name }}
- onlyif: systemctl >/dev/null 2>&1
prometheus-service-running-service-running:
service.running:
- name: {{ prometheus.service.name }}
- enable: True
{%- if 'config' in prometheus and prometheus.config %}
- watch:
- file: prometheus-config-file-file-managed-config_file
- require:
- service: prometheus-service-running-service-unmasked
- sls: {{ sls_config_args }}
- sls: {{ sls_config_file }}
{%- endif %}