KVM support for CentOS 5 (5.8, maybe 5.9 if such thing comes out).

This commit is contained in:
Ossi Herrala 2012-04-02 12:55:41 +00:00
parent 2e15368940
commit e8263790fb

View file

@ -29,10 +29,25 @@ class libvirt::client {
# #
class libvirt::kvm inherits libvirt::client { class libvirt::kvm inherits libvirt::client {
package { "qemu-kvm": case operatingsystem {
ensure => installed, centos,fedora: {
before => Service["libvirtd"], case $operatingsystemrelease {
require => [ User["qemu"], Group["qemu"] ], '/5\.[8-9]': {
package { "kvm":
ensure => installed,
before => Service["libvirtd"],
require => [ User["qemu"], Group["qemu"] ],
}
}
'/6\.[0-9]': {
package { "qemu-kvm":
ensure => installed,
before => Service["libvirtd"],
require => [ User["qemu"], Group["qemu"] ],
}
}
}
}
} }
if !$libvirt_admingroup { if !$libvirt_admingroup {
@ -41,7 +56,7 @@ class libvirt::kvm inherits libvirt::client {
file { "/etc/libvirt/libvirtd.conf": file { "/etc/libvirt/libvirtd.conf":
ensure => present, ensure => present,
mode => "0644", mode => 0644,
owner => "root", owner => "root",
group => "root", group => "root",
content => template("libvirt/libvirtd.conf.erb"), content => template("libvirt/libvirtd.conf.erb"),