2019-06-08 19:39:21 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=sls
|
|
|
|
|
|
|
|
{#- Get the `tplroot` from `tpldir` #}
|
|
|
|
{%- set tplroot = tpldir.split('/')[0] %}
|
2019-06-19 01:23:45 +02:00
|
|
|
{%- from tplroot ~ "/map.jinja" import prometheus as p with context %}
|
2019-06-17 23:02:51 +02:00
|
|
|
{%- set sls_alternatives_clean = tplroot ~ '.archive.alternatives.clean' %}
|
2019-06-22 19:24:19 +02:00
|
|
|
{%- set sls_users_clean = tplroot ~ '.config.users.clean' %}
|
2019-06-23 15:04:48 +02:00
|
|
|
{%- set sls_service_clean = tplroot ~ '.service.clean' %}
|
2019-06-17 23:02:51 +02:00
|
|
|
|
|
|
|
include:
|
2019-06-22 19:24:19 +02:00
|
|
|
- {{ sls_users_clean }}
|
2019-06-23 15:04:48 +02:00
|
|
|
- {{ sls_service_clean }}
|
2019-06-17 23:02:51 +02:00
|
|
|
- {{ sls_alternatives_clean }}
|
|
|
|
|
2019-06-20 02:36:58 +02:00
|
|
|
{%- for name in p.wanted %}
|
2019-06-17 23:02:51 +02:00
|
|
|
|
2019-06-20 02:36:58 +02:00
|
|
|
prometheus-archive-clean-{{ name }}-file-absent:
|
2019-06-08 19:39:21 +02:00
|
|
|
file.absent:
|
2019-06-19 01:23:45 +02:00
|
|
|
- names:
|
2019-06-20 02:36:58 +02:00
|
|
|
- {{ p.dir.basedir }}/{{ name + '-%s.%s-%s'|format(p.pkg[name]['archive_version'], p.kernel, p.arch) }}
|
2019-06-19 01:23:45 +02:00
|
|
|
|
2019-06-20 02:36:58 +02:00
|
|
|
prometheus-archive-clean-{{ name }}-user-absent:
|
2019-06-19 01:23:45 +02:00
|
|
|
user.absent:
|
2019-06-20 02:36:58 +02:00
|
|
|
- name: {{ name }}
|
2019-06-19 01:23:45 +02:00
|
|
|
group.absent:
|
2019-06-20 02:36:58 +02:00
|
|
|
- name: {{ name }}
|
2019-06-19 01:23:45 +02:00
|
|
|
- require:
|
2019-06-20 02:36:58 +02:00
|
|
|
- user: prometheus-archive-clean-{{ name }}-user-absent
|
2019-06-19 01:23:45 +02:00
|
|
|
|
2019-06-17 23:02:51 +02:00
|
|
|
{%- endfor %}
|
|
|
|
|
2019-06-22 19:24:19 +02:00
|
|
|
prometheus-archive-clean-basedir-file-directory:
|
2019-06-19 01:23:45 +02:00
|
|
|
file.absent:
|
2019-06-22 19:24:19 +02:00
|
|
|
- name: {{ p.dir.basedir }}
|