prometheus-formula/prometheus/config/environ.sls
N 1f86f4a27c
feat(archives): support for archives file format
BREAKING CHANGE: the parameter `pkg` is now a dictionary. References
 to `prometheus.pkg` should be changed to `prometheus.pkg.name`.
2019-06-15 01:52:59 +01:00

29 lines
875 B
Plaintext

# -*- coding: utf-8 -*-
# vim: ft=sls
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import prometheus with context %}
{%- set sls_archive_install = tplroot ~ '.archive.install' %}
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
include:
- {{ sls_archive_install }}
prometheus-config-file-file-managed-environ_file:
file.managed:
- name: {{ prometheus.environ_file }}
- source: {{ files_switch(['prometheus.sh.jinja'],
lookup='prometheus-config-file-file-managed-environ_file'
)
}}
- mode: 644
- user: root
- group: {{ prometheus.rootgroup }}
- makedirs: True
- template: jinja
- context:
prometheus: {{ prometheus|json }}
- require:
- sls: {{ sls_archive_install }}