Fallback for qemu-kvm

In case when qemu-kvm-rhev is not available (RDO), packstack should fallback
to qemu-kvm package.

Change-Id: I5d41a1db1f613e6c153ff02eaf13f1b6c4f0f48a
This commit is contained in:
Martin Magr
2014-05-29 14:13:37 +02:00
parent 87c54c656c
commit d9f3929dd7

View File

@@ -14,21 +14,12 @@ nova_config{
"libvirt/inject_partition": value => "-1"; "libvirt/inject_partition": value => "-1";
} }
case $::operatingsystem { # We need to preferably install qemu-kvm-rhev
'Fedora': { exec { 'qemu-kvm':
$qemu_package = 'qemu-kvm' path => '/usr/bin',
} command => 'yum install -y qemu-kvm',
'RedHat', 'CentOS': { onlyif => 'yum install -y qemu-kvm-rhev && exit 1 || exit 0',
$qemu_package = 'qemu-kvm-rhev' before => Class['nova::compute::libvirt']
}
default: {
$qemu_package = 'qemu-kvm'
}
}
package { 'qemu-kvm':
name => $qemu_package,
ensure => installed,
} }
class { 'nova::compute::libvirt': class { 'nova::compute::libvirt':