2019-04-24 18:18:44 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=sls
|
|
|
|
|
2020-05-14 01:27:23 +02:00
|
|
|
{%- set tplroot = tpldir.split('/')[0] %}
|
|
|
|
{%- from tplroot ~ "/map.jinja" import prometheus as p with context %}
|
|
|
|
{%- set sls_service_clean = tplroot ~ '.service.clean' %}
|
|
|
|
|
2019-04-24 18:18:44 +02:00
|
|
|
include:
|
2020-05-14 01:27:23 +02:00
|
|
|
- {{ sls_service_clean }}
|
|
|
|
|
|
|
|
{%- for name in p.wanted.component %}
|
|
|
|
|
|
|
|
prometheus-config-clean-{{ name }}:
|
|
|
|
- names:
|
2020-10-19 14:57:29 +02:00
|
|
|
- {{ p.dir.etc }}{{ d.div }}{{ name }}.yml
|
2020-05-14 01:27:23 +02:00
|
|
|
- {{ p.pkg.component[name]['environ_file'] }}
|
|
|
|
{%- if grains.os_family|lower in ('freebsd',) %}
|
|
|
|
sysrc.absent:
|
|
|
|
- name: {{ name }}_environ
|
|
|
|
{%- endif %}
|
|
|
|
user.absent:
|
|
|
|
- name: {{ name }}
|
|
|
|
{%- if grains.os_family == 'MacOS' %}
|
|
|
|
- onlyif: /usr/bin/dscl . list /Users | grep {{ name }} >/dev/null 2>&1
|
|
|
|
{%- endif %}
|
|
|
|
group.absent:
|
|
|
|
- name: {{ name }}
|
|
|
|
- require:
|
|
|
|
- {{ sls_config_clean }}
|
|
|
|
|
|
|
|
{%- endfor %}
|