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-06-16 02:33:24 +02:00
|
|
|
{%- from tplroot ~ "/map.jinja" import prometheus with context %}
|
2019-06-16 02:22:14 +02:00
|
|
|
{%- set sls_archive_clean = tplroot ~ '.archive.clean' %}
|
2019-06-16 02:33:24 +02:00
|
|
|
{%- set sls_alternatives_clean = tplroot ~ '.config.alternatives.clean' %}
|
2019-06-16 02:22:14 +02:00
|
|
|
|
2019-06-16 02:33:24 +02:00
|
|
|
{%- if grains.kernel|lower == 'linux' and prometheus.linux.altpriority|int > 0 %}
|
2019-04-24 18:18:44 +02:00
|
|
|
|
|
|
|
include:
|
2019-06-16 02:22:14 +02:00
|
|
|
- {{ sls_archive_clean }}
|
2019-06-16 02:33:24 +02:00
|
|
|
- {{ sls_alternatives_clean }}
|
2019-06-16 02:22:14 +02:00
|
|
|
|
2019-06-16 02:33:24 +02:00
|
|
|
prometheus-config-clean-file-absent:
|
|
|
|
file.absent:
|
|
|
|
- names:
|
|
|
|
- {{ prometheus.config_file }}
|
|
|
|
- {{ prometheus.environ_file }}
|
2019-04-26 14:02:30 +02:00
|
|
|
- require:
|
2019-06-16 02:22:14 +02:00
|
|
|
- sls: {{ sls_archive_clean }}
|
2019-06-16 02:33:24 +02:00
|
|
|
- sls: {{ sls_alternatives_clean }}
|
2019-06-16 02:22:14 +02:00
|
|
|
|
|
|
|
{%- endif %}
|