Skip to content

Commit

Permalink
Merge pull request #113 from mdschmitt/add_amazon_linux2_check
Browse files Browse the repository at this point in the history
fix(package/repo/install): Add AmazonLinux check, set canonical names for yum repos
  • Loading branch information
noelmcloughlin authored Sep 1, 2021
2 parents 3297120 + 1b923db commit 4bfe476
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions rabbitmq/package/repo/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,17 @@ rabbitmq-package-repo-rabbitmq:
- pkg: rabbitmq-package-install-pkg-installed
{% elif grains['os_family'] == 'RedHat' %}
{%- if grains['os'] == 'Amazon' %}
{%- set releasever = salt['cmd.run']("rpm -E '%{rhel}'") %}
{%- else %}
{%- set releasever = grains['osmajorrelease'] %}
{%- endif %}
rabbitmq-package-repo-erlang:
pkgrepo.managed:
- name: rabbitmq_rabbitmq-server
- name: rabbitmq_erlang
# using cloudsmith.io for rabbitmq-erlang (recommended)
- baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el/{{ grains.osmajorrelease }}/$basearch
- baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el/{{ releasever }}/$basearch
- gpgkey: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
- repo_gpgcheck: 1
- enabled: 1
Expand All @@ -66,9 +71,9 @@ rabbitmq-package-repo-erlang:
rabbitmq-package-repo-rabbitmq:
pkgrepo.managed:
- name: rabbitmq-rabbitmq
- name: rabbitmq_rabbitmq-server
# using packagecloud for rabbitmq-server (recommended)
- baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el/{{ grains.osmajorrelease }}/$basearch
- baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el/{{ releasever }}/$basearch
- gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
- enabled: 1
- gpgcheck: 0
Expand Down

0 comments on commit 4bfe476

Please sign in to comment.