prometheus-formula/prometheus/package/repo/install.sls

22 lines
673 B
Plaintext
Raw Normal View History

# -*- coding: utf-8 -*-
# vim: ft=sls
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import prometheus as p with context %}
2020-08-10 00:14:56 +02:00
{%- if p.pkg.use_upstream_repo and 'repo' in p.pkg and p.pkg.repo %}
{%- from tplroot ~ "/files/macros.jinja" import format_kwargs with context %}
prometheus-package-repo-install-pkgrepo-managed:
pkgrepo.managed:
2020-08-10 00:14:56 +02:00
{{- format_kwargs(p.pkg.repo) }}
file.replace:
# redhat workaround for salt issue #51494
- name: /etc/yum.repos.d/prometheus.repo
- pattern: ' gpgkey2='
- repl: '\n '
- ignore_if_missing: True
- onlyif: {{ grains.os_family == 'RedHat' }}
{%- endif %}