Skip to content

Commit 6ad0e4b

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 9d040e3 commit 6ad0e4b

File tree

4 files changed

+24
-22
lines changed

4 files changed

+24
-22
lines changed

REFERENCE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,11 +778,11 @@ Default value: `'python'`
778778
Data type: `Boolean`
779779

780780
Ensure that a repo with the official (and newer) RabbitMQ package is configured, along with its signing key.
781-
Defaults to false (use system packages). This does not ensure that soft dependencies (like EPEL on RHEL systems) are present.
781+
Defaults to true. This does not ensure that soft dependencies (like EPEL on RHEL systems) are present.
782782
It also does not solve the erlang dependency. See https://www.rabbitmq.com/which-erlang.html for a good breakdown of the
783783
different ways of handling the erlang deps. See also https://github.com/voxpupuli/puppet-rabbitmq/issues/788
784784

785-
Default value: `false`
785+
Default value: `true`
786786

787787
##### <a name="-rabbitmq--service_ensure"></a>`service_ensure`
788788

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: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,6 @@
3636
it { is_expected.to contain_package('rabbitmq-server-plugins') } if os_facts[:os]['family'] == 'Suse'
3737

3838
context 'with default params' do
39-
it { is_expected.not_to contain_class('rabbitmq::repo::apt') }
40-
it { is_expected.not_to contain_apt__source('rabbitmq') }
41-
it { is_expected.not_to contain_class('rabbitmq::repo::rhel') }
42-
it { is_expected.not_to contain_yumrepo('rabbitmq') }
43-
end
44-
45-
context 'with service_restart => false' do
46-
let(:params) { { service_restart: false } }
47-
48-
it { is_expected.not_to contain_class('rabbitmq::config').that_notifies('Class[rabbitmq::service]') }
49-
end
50-
51-
context 'with repos_ensure => true' do
52-
let(:params) { { repos_ensure: true } }
53-
5439
if os_facts[:os]['family'] == 'Debian'
5540
it 'includes rabbitmq::repo::apt' do
5641
is_expected.to contain_class('rabbitmq::repo::apt').
@@ -85,8 +70,23 @@
8570
end
8671
end
8772

73+
context 'with service_restart => false' do
74+
let(:params) { { service_restart: false } }
75+
76+
it { is_expected.not_to contain_class('rabbitmq::config').that_notifies('Class[rabbitmq::service]') }
77+
end
78+
79+
context 'with repos_ensure => false' do
80+
let(:params) { { repos_ensure: false } }
81+
82+
it { is_expected.not_to contain_class('rabbitmq::repo::apt') }
83+
it { is_expected.not_to contain_apt__source('rabbitmq') }
84+
it { is_expected.not_to contain_class('rabbitmq::repo::rhel') }
85+
it { is_expected.not_to contain_yumrepo('rabbitmq') }
86+
end
87+
8888
context 'with no pin', if: os_facts[:os]['family'] == 'Debian' do
89-
let(:params) { { repos_ensure: true, package_apt_pin: '' } }
89+
let(:params) { { package_apt_pin: '' } }
9090

9191
describe 'it sets up an apt::source' do
9292
it {
@@ -100,7 +100,7 @@
100100
end
101101

102102
context 'with pin', if: os_facts[:os]['family'] == 'Debian' do
103-
let(:params) { { repos_ensure: true, package_apt_pin: '700' } }
103+
let(:params) { { package_apt_pin: '700' } }
104104

105105
describe 'it sets up an apt::source and pin' do
106106
it {
@@ -245,6 +245,7 @@
245245
is_expected.to contain_class('rabbitmq::install::rabbitmqadmin')
246246
is_expected.not_to contain_package('python')
247247
is_expected.not_to contain_package('python2')
248+
is_expected.not_to contain_package('python3')
248249
end
249250
end
250251

0 commit comments

Comments
 (0)