Make vhd-util optional
vhd-util is not always present in default system package repositories. And even custom ppa might not provide the package for all distributions. If vhd-util is not available and we do not care for building vhd images, allow to opt-out from installing the dependency. Change-Id: Icb027b52fdcb790f99e90821974582da0bf6caab
This commit is contained in:
parent
97cc1d5c2e
commit
0b1ddfe1e6
|
@ -17,9 +17,22 @@
|
|||
class diskimage_builder (
|
||||
$git_source_repo = 'git+https://git.openstack.org/openstack/diskimage-builder',
|
||||
$use_git = false,
|
||||
$support_vhd = true,
|
||||
) {
|
||||
include ::pip
|
||||
include ::apt
|
||||
|
||||
if $support_vhd {
|
||||
include ::apt
|
||||
apt::ppa { 'ppa:openstack-ci-core/vhd-util':
|
||||
}
|
||||
package { 'vhd-util':
|
||||
ensure => present,
|
||||
require => [
|
||||
Apt::Ppa['ppa:openstack-ci-core/vhd-util'],
|
||||
Class['apt::update'],
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
$packages = [
|
||||
'debian-keyring',
|
||||
|
@ -28,20 +41,12 @@ class diskimage_builder (
|
|||
'python-lzma',
|
||||
'qemu-utils',
|
||||
'ubuntu-keyring',
|
||||
'vhd-util',
|
||||
'yum',
|
||||
'yum-utils',
|
||||
]
|
||||
|
||||
apt::ppa { 'ppa:openstack-ci-core/vhd-util':
|
||||
}
|
||||
|
||||
package { $packages:
|
||||
ensure => present,
|
||||
require => [
|
||||
Apt::Ppa['ppa:openstack-ci-core/vhd-util'],
|
||||
Class['apt::update'],
|
||||
],
|
||||
}
|
||||
|
||||
# required by the diskimage-builder element scripts
|
||||
|
|
Loading…
Reference in New Issue