2019-06-20 02:36:58 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=sls
|
|
|
|
|
|
|
|
{#- Get the `tplroot` from `tpldir` #}
|
|
|
|
{%- set tplroot = tpldir.split('/')[0] %}
|
|
|
|
{%- from tplroot ~ "/map.jinja" import prometheus with context %}
|
|
|
|
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
|
|
|
|
{%- set sls_service_clean = tplroot ~ '.service.clean' %}
|
|
|
|
|
|
|
|
include:
|
|
|
|
- {{ sls_service_clean }}
|
|
|
|
|
|
|
|
{%- for name in prometheus.wanted %}
|
|
|
|
|
|
|
|
prometheus-config-file-{{ name }}-file-absent:
|
|
|
|
file.absent:
|
|
|
|
- name: {{ prometheus.dir.etc }}/{{ name }}.yml
|
2019-06-22 23:34:37 +02:00
|
|
|
- require_in:
|
|
|
|
- file: prometheus-config-file-etc-file-absent
|
2019-06-20 02:36:58 +02:00
|
|
|
|
|
|
|
{%- endfor %}
|
2019-06-22 19:24:19 +02:00
|
|
|
|
|
|
|
prometheus-config-file-etc-file-absent:
|
|
|
|
file.absent:
|
|
|
|
- name: {{ prometheus.dir.etc }}
|
2019-06-22 23:34:37 +02:00
|
|
|
- require:
|
|
|
|
- sls: {{ sls_service_clean }}
|