Skip to content

Commit fc75c29

Browse files
committed
Change $repos_ensure to default to false.
The problem with it being true by default is that the majority of production environments, and any in an isolated nextwork, will not want to get the gpg key, especially if they have not explicitly configured the module to get the rpm from the rabbitmq repos. Having the gpg key pulled in by default while installing the rpm from distro repos seems inconsistent at best, and at worst, causes an additional fail point for deployments that are unable to contact this location. Leaving it true by default forces the majority of production users to have to override this setting.
1 parent 21f5762 commit fc75c29

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

manifests/params.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
$management_ssl = true
7070
$package_apt_pin = ''
7171
$package_gpg_key = 'https://www.rabbitmq.com/rabbitmq-signing-key-public.asc'
72-
$repos_ensure = true
72+
$repos_ensure = false
7373
$manage_repos = undef
7474
$service_ensure = 'running'
7575
$service_manage = true

spec/classes/rabbitmq_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
context 'on Debian' do
1414
let(:facts) {{ :osfamily => 'Debian', :lsbdistid => 'Debian', :lsbdistcodename => 'squeeze' }}
15+
let(:params) {{ :repos_ensure => true }}
1516
it 'includes rabbitmq::repo::apt' do
1617
should contain_class('rabbitmq::repo::apt')
1718
end
@@ -37,7 +38,7 @@
3738
end
3839

3940
context 'on Debian' do
40-
let(:params) {{ :manage_repos => true }}
41+
let(:params) {{ :manage_repos => true, :repos_ensure => true }}
4142
let(:facts) {{ :osfamily => 'Debian', :lsbdistid => 'Debian', :lsbdistcodename => 'squeeze' }}
4243

4344
it 'includes rabbitmq::repo::apt' do
@@ -182,6 +183,7 @@
182183

183184
context 'on Redhat' do
184185
let(:facts) {{ :osfamily => 'RedHat', :operatingsystemmajrelease => '7' }}
186+
let(:params) {{ :manage_repos => false, :repos_ensure => true }}
185187
it 'includes rabbitmq::repo::rhel' do
186188
should contain_class('rabbitmq::repo::rhel')
187189
should contain_exec('rpm --import https://www.rabbitmq.com/rabbitmq-signing-key-public.asc')
@@ -1371,6 +1373,7 @@
13711373
describe 'imports the key' do
13721374
let(:facts) { osfacts }
13731375
let(:params) {{ :package_gpg_key => 'https://www.rabbitmq.com/rabbitmq-signing-key-public.asc' }}
1376+
let(:params) {{ :repos_ensure => true }}
13741377

13751378
it { should contain_exec("rpm --import #{params[:package_gpg_key]}").with(
13761379
'path' => ['/bin','/usr/bin','/sbin','/usr/sbin']

0 commit comments

Comments
 (0)