2019-04-24 18:18:44 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=sls
|
|
|
|
|
|
|
|
{#- Get the `tplroot` from `tpldir` #}
|
|
|
|
{%- set tplroot = tpldir.split('/')[0] %}
|
2019-04-26 14:02:30 +02:00
|
|
|
{%- set sls_config_args = tplroot ~ '.config.args' %}
|
2019-04-24 18:18:44 +02:00
|
|
|
{%- set sls_config_file = tplroot ~ '.config.file' %}
|
|
|
|
{%- from tplroot ~ "/map.jinja" import prometheus with context %}
|
|
|
|
|
|
|
|
include:
|
2019-04-26 14:02:30 +02:00
|
|
|
- {{ sls_config_args }}
|
2019-04-24 18:18:44 +02:00
|
|
|
- {{ sls_config_file }}
|
|
|
|
|
|
|
|
prometheus-service-running-service-running:
|
|
|
|
service.running:
|
|
|
|
- name: {{ prometheus.service.name }}
|
|
|
|
- enable: True
|
|
|
|
- watch:
|
|
|
|
- file: prometheus-config-file-file-managed
|
|
|
|
- require:
|
2019-04-26 14:02:30 +02:00
|
|
|
- sls: {{ sls_config_args }}
|
2019-04-24 18:18:44 +02:00
|
|
|
- sls: {{ sls_config_file }}
|