Skip to content

Commit

Permalink
Merge pull request #120 from daks/apt-repo
Browse files Browse the repository at this point in the history
Move apt repositories to map.jinja and update them to recommended ones
  • Loading branch information
myii authored Jun 9, 2022
2 parents b17e8e0 + d1ed9d1 commit 9d1e643
Show file tree
Hide file tree
Showing 33 changed files with 354 additions and 18 deletions.
29 changes: 11 additions & 18 deletions rabbitmq/package/repo/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,22 @@ rabbitmq-package-repo-pkg-deps:
- pkgrepo: rabbitmq-package-repo-erlang
- pkgrepo: rabbitmq-package-repo-rabbitmq
{%- set osfullname = grains['osfullname'] %}
{%- set oscodename = grains['oscodename'] %}
rabbitmq-package-repo-erlang:
pkgrepo.managed:
# using cloudsmith.io for rabbitmq-erlang (recommended)
- name: deb https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/ubuntu bionic main
- humanname: Erlang from CloudSmith Repository
# "ubuntu:bionic" as distribution may work for recent Ubuntu or Debian release
- name: deb {{ rabbitmq.pkg.repo.erlang.url }}/{{ osfullname|lower }} {{ oscodename }} main
- file: /etc/apt/sources.list.d/erlang.list
- key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
- key_url: {{ rabbitmq.pkg.repo.erlang.key_url }}
- require_in:
- pkg: rabbitmq-package-install-pkg-installed
rabbitmq-package-repo-rabbitmq:
pkgrepo.managed:
# using packagecloud for rabbitmq-server (recommended)
- name: deb https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu bionic main
- humanname: RabbitMQ PackageCloud Repository
# https://www.rabbitmq.com/install-debian.html#apt
# "bionic" as distribution name should work for any reasonably recent Ubuntu or Debian release.
# See the release to distribution mapping table in RabbitMQ doc guides to learn more.
- name: deb {{ rabbitmq.pkg.repo.rabbitmq.url }}/{{ osfullname|lower }} {{ oscodename }} main
- file: /etc/apt/sources.list.d/rabbitmq.list
- key_url: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
- key_url: {{ rabbitmq.pkg.repo.rabbitmq.key_url }}
- require_in:
- pkg: rabbitmq-package-install-pkg-installed
Expand All @@ -54,9 +49,8 @@ rabbitmq-package-repo-rabbitmq:
rabbitmq-package-repo-erlang:
pkgrepo.managed:
- name: rabbitmq_erlang
# using cloudsmith.io for rabbitmq-erlang (recommended)
- 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
- baseurl: {{ rabbitmq.pkg.repo.erlang.baseurl }}/{{ releasever }}/$basearch
- gpgkey: {{ rabbitmq.pkg.repo.erlang.gpgkey }}
- repo_gpgcheck: 1
- enabled: 1
- gpgcheck: 0
Expand All @@ -72,9 +66,8 @@ rabbitmq-package-repo-erlang:
rabbitmq-package-repo-rabbitmq:
pkgrepo.managed:
- name: rabbitmq_rabbitmq-server
# using packagecloud for rabbitmq-server (recommended)
- baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el/{{ releasever }}/$basearch
- gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
- baseurl: {{ rabbitmq.pkg.repo.rabbitmq.baseurl }}/{{ releasever }}/$basearch
- gpgkey: {{ rabbitmq.pkg.repo.rabbitmq.gpgkey }}
- enabled: 1
- gpgcheck: 0
- sslverify: 1
Expand Down
9 changes: 9 additions & 0 deletions rabbitmq/parameters/os_family/Debian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,13 @@ values:
deps:
- libtinfo5
- erlang-eldap
repo:
erlang:
# yamllint disable-line rule:line-length
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb
rabbitmq:
# yamllint disable-line rule:line-length
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/gpg.9F4587F226208342.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb
...
8 changes: 8 additions & 0 deletions rabbitmq/parameters/os_family/RedHat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,12 @@ values:
pkg:
deps:
- socat
repo:
erlang:
baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el
# yamllint disable-line rule:line-length
gpgkey: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
rabbitmq:
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el
gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
...
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/almalinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el
gpgkey: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
rabbitmq:
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el
gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/centos-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el
gpgkey: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
rabbitmq:
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el
gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/centos-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el
gpgkey: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
rabbitmq:
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el
gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/debian-10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb
rabbitmq:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/gpg.9F4587F226208342.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/debian-11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb
rabbitmq:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/gpg.9F4587F226208342.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/debian-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb
rabbitmq:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/gpg.9F4587F226208342.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/fedora-34.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el
gpgkey: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
rabbitmq:
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el
gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/fedora-35.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el
gpgkey: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
rabbitmq:
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el
gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/fedora-36.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el
gpgkey: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
rabbitmq:
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el
gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/oraclelinux-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el
gpgkey: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
rabbitmq:
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el
gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/oraclelinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el
gpgkey: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
rabbitmq:
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el
gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/rockylinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el
gpgkey: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
rabbitmq:
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el
gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/ubuntu-16.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb
rabbitmq:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/gpg.9F4587F226208342.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/ubuntu-18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb
rabbitmq:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/gpg.9F4587F226208342.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/default/files/_mapdata/ubuntu-20.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb
rabbitmq:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/gpg.9F4587F226208342.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb
use_upstream: repo
retry_option:
attempts: 0
Expand Down
65 changes: 65 additions & 0 deletions test/integration/default/files/_mapdata/ubuntu-22.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# yamllint disable rule:indentation rule:line-length
---
values:
added_in_defaults: defaults_value
arch: amd64
dir:
base: "/usr/lib/rabbitmq"
cleanlist:
- "/usr/local/bin/rabbitmq-env"
- "/usr/local/bin/rabbitmq-plugins"
- "/var/run/rabbitmq"
config: "/etc/rabbitmq"
data: "/var/lib/rabbitmq"
service: "/usr/lib/systemd/system"
environ: {}
erlang_cookie: shared-secret
map_jinja:
sources:
- Y:G@osarch
- Y:G@os_family
- Y:G@os
- Y:G@osfinger
- C@rabbitmq:lookup
- C@rabbitmq
- Y:G@id
nodes:
rabbit:
clustered: false
config: {}
distport: 25672
nodeport: 5672
parameters: {}
plugins:
- rabbitmq_management
- rabbitmq_federation
- rabbitmq_federation_management
- rabbitmq_auth_backend_ldap
policies: {}
queues: {}
remove_guest_user: true
service: true
users: {}
vhosts: {}
pkg:
deps:
- libtinfo5
- erlang-eldap
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb
rabbitmq:
key_url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/gpg.9F4587F226208342.key
url: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb
use_upstream: repo
retry_option:
attempts: 0
interval: 60
splay: 10
until: true
rootgroup: root
winner: defaults
7 changes: 7 additions & 0 deletions test/integration/nopillars/files/_mapdata/almalinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el
gpgkey: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
rabbitmq:
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el
gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
use_upstream: repo
retry_option:
attempts: 0
Expand Down
7 changes: 7 additions & 0 deletions test/integration/nopillars/files/_mapdata/amazonlinux-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ values:
deps_disablerepo: ''
name: rabbitmq-server
remove_os_erlang: true
repo:
erlang:
baseurl: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el
gpgkey: https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
rabbitmq:
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el
gpgkey: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
use_upstream: repo
retry_option:
attempts: 0
Expand Down
Loading

0 comments on commit 9d1e643

Please sign in to comment.