nosql: use api_eth for binding

Close bug#170

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
Emilien Macchi
2014-02-06 17:29:57 +01:00
parent 49cc4bd8ec
commit 74cf957d24
2 changed files with 11 additions and 3 deletions

View File

@@ -18,15 +18,16 @@
# Install a nosql server (MongoDB)
#
class cloud::database::nosql(
$bind_ip = undef,
$bind_ip = $os_params::api_eth,
) {
# use mongo's own repo instead of the distro's
class { 'mongodb::globals':
manage_package_repo => true
}->
class { 'mongodb':
bind_ip => $bind_ip,
bind_ip => [$bind_ip],
}
}

View File

@@ -22,9 +22,15 @@ describe 'cloud::database::nosql' do
shared_examples_for 'openstack database nosql' do
let :params do
{ :bind_ip => '10.0.0.1' }
end
it 'configure mongodb server' do
should contain_class('mongodb::globals').with( :manage_package_repo => true)
should contain_class('mongodb')
should contain_class('mongodb').with(
:bind_ip => ['10.0.0.1']
)
end
end
@@ -46,3 +52,4 @@ describe 'cloud::database::nosql' do
end
end