Merge pull request #32 from noelmcloughlin/repo

fix(ubuntu): pkgrepo cannot be used
This commit is contained in:
N 2020-08-17 16:44:15 +02:00 committed by GitHub
commit 9b6c13d62c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -23,11 +23,11 @@ Debian:
pkg:
deps:
- cron
use_upstream_repo: true
use_upstream_repo: false
use_upstream_package: false
use_upstream_archive: false
use_upstream_archive: true
repo:
humanname: prometheus repository
humanname: 'prometheus repository'
key_url: 'https://s3-eu-west-1.amazonaws.com/deb.robustperception.io/41EFC99D.gpg'
file: /etc/apt/sources.list.d/prometheus.list
component:

View File

@ -4,12 +4,12 @@
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import prometheus as p with context %}
{%- if p.pkg.use_upstream_repo and 'repo' in p.pkg %}
{%- 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:
{{- format_kwargs(p.pkg['repo']) }}
{{- format_kwargs(p.pkg.repo) }}
file.replace:
# redhat workaround for salt issue #51494
- name: /etc/yum.repos.d/prometheus.repo