ce5b7712c9
BREAKING CHANGE: The data dictionary is simplified and expanded. Retest your states and update pillar data accordingly. For developer convenience, clientlibs states were introduced. See pillar.example, defaults.yaml, and docs/README.
32 lines
869 B
Plaintext
32 lines
869 B
Plaintext
# -*- coding: utf-8 -*-
|
|
# vim: ft=sls
|
|
|
|
{%- set tplroot = tpldir.split('/')[0] %}
|
|
{%- from tplroot ~ "/map.jinja" import prometheus as p with context %}
|
|
{%- set sls_service_clean = tplroot ~ '.service.clean' %}
|
|
|
|
include:
|
|
- {{ sls_service_clean }}
|
|
|
|
{%- for name in p.wanted.component %}
|
|
|
|
prometheus-config-clean-{{ name }}:
|
|
- names:
|
|
- {{ p.dir.etc }}/{{ name }}.yml
|
|
- {{ 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 %}
|