Skip to content

Commit

Permalink
fix: Check for Amazon in osfamilymap for pkg repo
Browse files Browse the repository at this point in the history
  * Add check for Amazon Linux to map.jinja so that the RPM package repository
    is properly generated.

  Resolves saltstack-formulas#65
  • Loading branch information
mdschmitt committed Jul 15, 2021
1 parent 8e96162 commit ff6af57
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion prometheus/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,14 @@ RedHat:
args:
config.file: /etc/prometheus/blackbox.yml
repo:
{%- if grains.os == 'Amazon' %}
{%- set releasever = salt['cmd.run']("rpm -E '%{rhel}'") %}
{% else %}
{%- set releasever = "$releasever" %}
{%- endif %}
# https://akai-tsuki.hatenablog.com/entry/2017/12/03/000000
# yamllint disable rule:line-length
baseurl: 'https://packagecloud.io/prometheus-rpm/release/el/$releasever/$basearch'
baseurl: "https://packagecloud.io/prometheus-rpm/release/el/{{ releasever }}/$basearch"
gpgkey: 'https://packagecloud.io/prometheus-rpm/release/gpgkey gpgkey2=https://raw.githubusercontent.com/lest/prometheus-rpm/master/RPM-GPG-KEY-prometheus-rpm'
# yamllint enable rule:line-length
sslverify: 1
Expand Down Expand Up @@ -443,3 +448,7 @@ MacOS:
archive:
source_hash: 15132494523c2b6a89e09b2da63452c8fe587fb82fcc3fd21cc75a4aa2766644





0 comments on commit ff6af57

Please sign in to comment.