fix: check for Amazon in osfamilymap for pkg repo

* Add check for Amazon Linux to osfamilymap.yaml so that the RPM package repository is properly generated.

Resolves #65
This commit is contained in:
Michael Schmitt 2021-07-13 17:48:37 -06:00
parent 8e9616208c
commit 338ab4ddb6
No known key found for this signature in database
GPG Key ID: 5145CC5841E00C15

View File

@ -206,9 +206,14 @@ RedHat:
args: args:
config.file: /etc/prometheus/blackbox.yml config.file: /etc/prometheus/blackbox.yml
repo: 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 # https://akai-tsuki.hatenablog.com/entry/2017/12/03/000000
# yamllint disable rule:line-length # 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' 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 # yamllint enable rule:line-length
sslverify: 1 sslverify: 1