Merge pull request #184 from enovance/bug/183/goneri

mongod: 10gen packages only on Debian
This commit is contained in:
Sebastien Badia 2014-02-10 17:29:23 +01:00
commit 6abce120d0
2 changed files with 9 additions and 4 deletions

View File

@ -38,13 +38,17 @@ class cloud::database::nosql(
# bind_ip should be an array
$bind_ip_real = any2array($bind_ip)
# use mongo's own repo instead of the distro's
$manage_mongodb_package_repo = $::osfamily ? {
'RedHat' => false,
default => true
}
class { 'mongodb::globals':
manage_package_repo => true
manage_package_repo => $manage_mongodb_package_repo
}->
class { 'mongodb':
bind_ip => $bind_ip_real,
nojournal => $nojournal
nojournal => $nojournal,
}
}

View File

@ -28,7 +28,6 @@ describe 'cloud::database::nosql' do
end
it 'configure mongodb server' do
should contain_class('mongodb::globals').with( :manage_package_repo => true)
should contain_class('mongodb::globals').with_before('Class[Mongodb]')
should contain_class('mongodb').with(
:bind_ip => ['10.0.0.1'],
@ -43,6 +42,7 @@ describe 'cloud::database::nosql' do
{ :osfamily => 'Debian' }
end
it { should contain_class('mongodb::globals').with( :manage_package_repo => true) }
it_configures 'openstack database nosql'
end
@ -51,6 +51,7 @@ describe 'cloud::database::nosql' do
{ :osfamily => 'RedHat' }
end
it { should contain_class('mongodb::globals').with( :manage_package_repo => false) }
it_configures 'openstack database nosql'
end