Merge "Install bridge-utils only if needed"
This commit is contained in:
@@ -10,7 +10,8 @@ class nova::compute (
|
|||||||
$vncproxy_port = '6080',
|
$vncproxy_port = '6080',
|
||||||
$vncproxy_path = '/vnc_auto.html',
|
$vncproxy_path = '/vnc_auto.html',
|
||||||
$force_config_drive = false,
|
$force_config_drive = false,
|
||||||
$virtio_nic = false
|
$virtio_nic = false,
|
||||||
|
$neutron_enabled = true
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include nova::params
|
include nova::params
|
||||||
@@ -30,9 +31,12 @@ class nova::compute (
|
|||||||
'DEFAULT/vncserver_proxyclient_address': value => $vncserver_proxyclient_address;
|
'DEFAULT/vncserver_proxyclient_address': value => $vncserver_proxyclient_address;
|
||||||
}
|
}
|
||||||
|
|
||||||
package { 'bridge-utils':
|
if $neutron_enabled != true {
|
||||||
ensure => present,
|
# Install bridge-utils if we use nova-network
|
||||||
before => Nova::Generic_service['compute'],
|
package { 'bridge-utils':
|
||||||
|
ensure => present,
|
||||||
|
before => Nova::Generic_service['compute'],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nova::generic_service { 'compute':
|
nova::generic_service { 'compute':
|
||||||
|
@@ -10,7 +10,8 @@ describe 'nova::compute' do
|
|||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:vncproxy_host => '127.0.0.1'
|
:vncproxy_host => '127.0.0.1',
|
||||||
|
:neutron_enabled => true
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -36,7 +37,7 @@ describe 'nova::compute' do
|
|||||||
'ensure' => 'present',
|
'ensure' => 'present',
|
||||||
'notify' => 'Service[nova-compute]'
|
'notify' => 'Service[nova-compute]'
|
||||||
) }
|
) }
|
||||||
it { should contain_package('bridge-utils').with(
|
it { should_not contain_package('bridge-utils').with(
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
:before => 'Nova::Generic_service[compute]'
|
:before => 'Nova::Generic_service[compute]'
|
||||||
) }
|
) }
|
||||||
|
Reference in New Issue
Block a user