Skip to content

Commit fbf40a1

Browse files
committed
Re-enable repos_ensure by default
This re-enables repos_ensure by default so that the newer packages hosted in packagecloud are installed.
1 parent 1a1c6e7 commit fbf40a1

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

data/family/RedHat.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2+
rabbitmq::python_package: 'python3'
23
rabbitmq::package_name: 'rabbitmq-server'
34
rabbitmq::service_name: 'rabbitmq-server'
45
rabbitmq::package_gpg_key: 'https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc'
5-
rabbitmq::repo_gpg_key: 'https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey'
6+
rabbitmq::repo_gpg_key: 'https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey'

manifests/init.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
# Name of the package required by rabbitmqadmin.
239239
# @param repos_ensure
240240
# Ensure that a repo with the official (and newer) RabbitMQ package is configured, along with its signing key.
241-
# Defaults to false (use system packages). This does not ensure that soft dependencies (like EPEL on RHEL systems) are present.
241+
# Defaults to true. This does not ensure that soft dependencies (like EPEL on RHEL systems) are present.
242242
# It also does not solve the erlang dependency. See https://www.rabbitmq.com/which-erlang.html for a good breakdown of the
243243
# different ways of handling the erlang deps. See also https://github.com/voxpupuli/puppet-rabbitmq/issues/788
244244
# @param service_ensure
@@ -377,7 +377,7 @@
377377
Variant[String, Array] $package_name = 'rabbitmq',
378378
Optional[String] $package_source = undef,
379379
Optional[String] $package_provider = undef,
380-
Boolean $repos_ensure = false,
380+
Boolean $repos_ensure = true,
381381
Boolean $manage_python = true,
382382
String $python_package = 'python',
383383
String $rabbitmq_user = 'rabbitmq',

spec/classes/rabbitmq_spec.rb

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,6 @@
2929
it { is_expected.to contain_package('rabbitmq-server-plugins') } if facts[:os]['family'] == 'Suse'
3030

3131
context 'with default params' do
32-
it { is_expected.not_to contain_class('rabbitmq::repo::apt') }
33-
it { is_expected.not_to contain_apt__source('rabbitmq') }
34-
it { is_expected.not_to contain_class('rabbitmq::repo::rhel') }
35-
it { is_expected.not_to contain_yumrepo('rabbitmq') }
36-
end
37-
38-
context 'with service_restart => false' do
39-
let(:params) { { service_restart: false } }
40-
41-
it { is_expected.not_to contain_class('rabbitmq::config').that_notifies('Class[rabbitmq::service]') }
42-
end
43-
44-
context 'with repos_ensure => true' do
45-
let(:params) { { repos_ensure: true } }
46-
4732
if facts[:os]['family'] == 'Debian'
4833
it 'includes rabbitmq::repo::apt' do
4934
is_expected.to contain_class('rabbitmq::repo::apt').
@@ -78,8 +63,23 @@
7863
end
7964
end
8065

66+
context 'with service_restart => false' do
67+
let(:params) { { service_restart: false } }
68+
69+
it { is_expected.not_to contain_class('rabbitmq::config').that_notifies('Class[rabbitmq::service]') }
70+
end
71+
72+
context 'with repos_ensure => false' do
73+
let(:params) { { repos_ensure: false } }
74+
75+
it { is_expected.not_to contain_class('rabbitmq::repo::apt') }
76+
it { is_expected.not_to contain_apt__source('rabbitmq') }
77+
it { is_expected.not_to contain_class('rabbitmq::repo::rhel') }
78+
it { is_expected.not_to contain_yumrepo('rabbitmq') }
79+
end
80+
8181
context 'with no pin', if: facts[:os]['family'] == 'Debian' do
82-
let(:params) { { repos_ensure: true, package_apt_pin: '' } }
82+
let(:params) { { package_apt_pin: '' } }
8383

8484
if Puppet.version =~ %r{^[6,7]} # https://tickets.puppetlabs.com/browse/PUP-9112 and https://tickets.puppetlabs.com/browse/PUP-9180
8585
let(:expected_key_apt_source_key_content) { 'nil' }
@@ -99,7 +99,7 @@
9999
end
100100

101101
context 'with pin', if: facts[:os]['family'] == 'Debian' do
102-
let(:params) { { repos_ensure: true, package_apt_pin: '700' } }
102+
let(:params) { { package_apt_pin: '700' } }
103103

104104
if Puppet.version =~ %r{^[6,7]} # https://tickets.puppetlabs.com/browse/PUP-9112 and https://tickets.puppetlabs.com/browse/PUP-9180
105105
let(:expected_key_apt_source_key_content) { 'nil' }

0 commit comments

Comments
 (0)