From e8263790fb29d6d4bce723156e0a4a528ea00a19 Mon Sep 17 00:00:00 2001 From: Ossi Herrala Date: Mon, 2 Apr 2012 12:55:41 +0000 Subject: [PATCH] KVM support for CentOS 5 (5.8, maybe 5.9 if such thing comes out). --- libvirt/manifests/init.pp | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/libvirt/manifests/init.pp b/libvirt/manifests/init.pp index 88abc0e..7820081 100644 --- a/libvirt/manifests/init.pp +++ b/libvirt/manifests/init.pp @@ -29,10 +29,25 @@ class libvirt::client { # class libvirt::kvm inherits libvirt::client { - package { "qemu-kvm": - ensure => installed, - before => Service["libvirtd"], - require => [ User["qemu"], Group["qemu"] ], + case operatingsystem { + centos,fedora: { + case $operatingsystemrelease { + '/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 { @@ -41,7 +56,7 @@ class libvirt::kvm inherits libvirt::client { file { "/etc/libvirt/libvirtd.conf": ensure => present, - mode => "0644", + mode => 0644, owner => "root", group => "root", content => template("libvirt/libvirtd.conf.erb"),