Make package 'bridge-utils' install optional
When using puppet-nova with another big Puppet modules this package may be defined before. The solution is to make an installation optional. Change-Id: I744fe89e8d9dae79a5b822ac1a1ad4cee780bfc4 Closes-Bug: #1445437
This commit is contained in:
@@ -60,6 +60,11 @@
|
||||
# (optional) Whether to use Neutron for networking of VMs
|
||||
# Defaults to true
|
||||
#
|
||||
# [*install_bridge_utils*]
|
||||
# (optional) Whether to install the bridge-utils package or not.
|
||||
# Applicable only for cases when Neutron was disabled
|
||||
# Defaults to true
|
||||
#
|
||||
# [*network_device_mtu*]
|
||||
# (optional) The MTU size for the interfaces managed by nova
|
||||
# Defaults to undef
|
||||
@@ -120,6 +125,7 @@ class nova::compute (
|
||||
$force_config_drive = false,
|
||||
$virtio_nic = false,
|
||||
$neutron_enabled = true,
|
||||
$install_bridge_utils = true,
|
||||
$network_device_mtu = undef,
|
||||
$instance_usage_audit = false,
|
||||
$instance_usage_audit_period = 'month',
|
||||
@@ -151,7 +157,7 @@ class nova::compute (
|
||||
'DEFAULT/vnc_keymap': value => $vnc_keymap;
|
||||
}
|
||||
|
||||
if $neutron_enabled != true {
|
||||
if $neutron_enabled != true and $install_bridge_utils {
|
||||
# Install bridge-utils if we use nova-network
|
||||
package { 'bridge-utils':
|
||||
ensure => present,
|
||||
|
@@ -121,6 +121,21 @@ describe 'nova::compute' do
|
||||
:before => 'Nova::Generic_service[compute]'
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'with install_bridge_utils set to false' do
|
||||
let :params do
|
||||
{ :install_bridge_utils => false }
|
||||
end
|
||||
|
||||
it 'does not install bridge-utils package for nova-network' do
|
||||
is_expected.to_not contain_package('bridge-utils').with(
|
||||
:ensure => 'present',
|
||||
:before => 'Nova::Generic_service[compute]'
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'with vnc_enabled set to false' do
|
||||
|
Reference in New Issue
Block a user