Skip to content

Commit 24a745b

Browse files
committed
Change repos_ensure default from false to true
1 parent fd25406 commit 24a745b

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

data/common.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ rabbitmq::package_gpg_key: ~
2929
rabbitmq::package_name: 'rabbitmq'
3030
rabbitmq::package_source: ~
3131
rabbitmq::package_provider: ~
32-
rabbitmq::repos_ensure: false
32+
rabbitmq::repos_ensure: true
3333
rabbitmq::manage_python: true
3434
rabbitmq::python_package: 'python'
3535
rabbitmq::rabbitmq_user: 'rabbitmq'

manifests/init.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
# Name of the package required by rabbitmqadmin.
203203
# @param repos_ensure
204204
# Ensure that a repo with the official (and newer) RabbitMQ package is configured, along with its signing key.
205-
# Defaults to false (use system packages). This does not ensure that soft dependencies (like EPEL on RHEL systems) are present.
205+
# Defaults to true (use RabbitMQ repos). This does not ensure that soft dependencies (like EPEL on RHEL systems) are present.
206206
# It also does not solve the erlang dependency. See https://www.rabbitmq.com/which-erlang.html for a good breakdown of the
207207
# different ways of handling the erlang deps. See also https://github.com/voxpupuli/puppet-rabbitmq/issues/788
208208
# @param service_ensure
@@ -329,7 +329,7 @@
329329
Variant[String, Array] $package_name = 'rabbitmq',
330330
Optional[String] $package_source = undef,
331331
Optional[String] $package_provider = undef,
332-
Boolean $repos_ensure = false,
332+
Boolean $repos_ensure = true,
333333
Boolean $manage_python = true,
334334
String $python_package = 'python',
335335
String $rabbitmq_user = 'rabbitmq',

spec/classes/rabbitmq_spec.rb

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,6 @@
2727
end
2828

2929
context 'with default params' do
30-
it { is_expected.not_to contain_class('rabbitmq::repo::apt') }
31-
it { is_expected.not_to contain_apt__source('rabbitmq') }
32-
it { is_expected.not_to contain_class('rabbitmq::repo::rhel') }
33-
it { is_expected.not_to contain_yumrepo('rabbitmq') }
34-
end
35-
36-
context 'with service_restart => false' do
37-
let(:params) { { service_restart: false } }
38-
39-
it { is_expected.not_to contain_class('rabbitmq::config').that_notifies('Class[rabbitmq::service]') }
40-
end
41-
42-
context 'with repos_ensure => true' do
43-
let(:params) { { repos_ensure: true } }
44-
4530
if facts[:os]['family'] == 'Debian'
4631
it 'includes rabbitmq::repo::apt' do
4732
is_expected.to contain_class('rabbitmq::repo::apt').
@@ -76,6 +61,21 @@
7661
end
7762
end
7863

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

0 commit comments

Comments
 (0)