Merge pull request #67 from mdschmitt/master

Check for Amazon in osfamilymap to create pkg repo
This commit is contained in:
Imran Iqbal 2021-07-16 03:39:19 +01:00 committed by GitHub
commit f9c4e46282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -167,9 +167,9 @@ default-opensuse-leap-152-master-py3: {extends: '.test_instance'}
default-opensuse-tmbl-latest-master-py3: {extends: '.test_instance'} default-opensuse-tmbl-latest-master-py3: {extends: '.test_instance'}
# repo-opensuse-tmbl-latest-master-py3: {extends: '.test_instance'} # repo-opensuse-tmbl-latest-master-py3: {extends: '.test_instance'}
# opensuse-tmbl-latest-master-py3: {extends: '.test_instance'} # opensuse-tmbl-latest-master-py3: {extends: '.test_instance'}
default-amazonlinux-2-master-py3: {extends: '.test_instance'} # default-amazonlinux-2-master-py3: {extends: '.test_instance'}
# repo-amazonlinux-2-master-py3: {extends: '.test_instance'} # repo-amazonlinux-2-master-py3: {extends: '.test_instance'}
# amazonlinux-2-master-py3: {extends: '.test_instance'} amazonlinux-2-master-py3: {extends: '.test_instance'}
# default-oraclelinux-8-master-py3: {extends: '.test_instance'} # default-oraclelinux-8-master-py3: {extends: '.test_instance'}
# repo-oraclelinux-8-master-py3: {extends: '.test_instance'} # repo-oraclelinux-8-master-py3: {extends: '.test_instance'}
oraclelinux-8-master-py3: {extends: '.test_instance'} oraclelinux-8-master-py3: {extends: '.test_instance'}

View File

@ -28,7 +28,7 @@ prometheus-clientlibs-install-{{ name }}:
- group - group
- mode - mode
{%- endif %} {%- endif %}
{%- if grains.get('osfinger', '') in ['Oracle Linux Server-8'] %} {%- if grains.get('osfinger', '') in ['Oracle Linux Server-8', 'Amazon Linux-2'] %}
pkg.installed: pkg.installed:
- name: tar - name: tar
- require_in: - require_in:

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