Added support for RHEL and did some syntax cleaning
Assume that "RedHat" also works where "CentOS" does.
This commit is contained in:
parent
e9aae1dcf6
commit
24ecb51f6f
63 changed files with 544 additions and 497 deletions
|
@ -13,15 +13,15 @@ class libvirt::client {
|
|||
require => [ User["qemu"], Group["qemu"], ],
|
||||
}
|
||||
|
||||
case $operatingsystem {
|
||||
centos,fedora: {
|
||||
case $::operatingsystem {
|
||||
"centos","redhat","fedora": {
|
||||
package { [ "libvirt", "virt-manager", "virt-viewer", ]:
|
||||
ensure => installed,
|
||||
require => File["/var/lib/qemu"],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Not supported on ${operatingsystem}.")
|
||||
fail("Not supported on ${::operatingsystem}.")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,10 +37,10 @@ class libvirt::client {
|
|||
#
|
||||
class libvirt::kvm inherits libvirt::client {
|
||||
|
||||
case $operatingsystem {
|
||||
centos,fedora: {
|
||||
case $operatingsystemrelease {
|
||||
/5\..*/: {
|
||||
case $::operatingsystem {
|
||||
"centos","redhat": {
|
||||
case $::operatingsystemrelease {
|
||||
/^5\./: {
|
||||
package { ["kvm", "kmod-kvm"]:
|
||||
ensure => installed,
|
||||
before => Service["libvirtd"],
|
||||
|
@ -59,6 +59,16 @@ class libvirt::kvm inherits libvirt::client {
|
|||
}
|
||||
}
|
||||
}
|
||||
"fedora": {
|
||||
package { "qemu-kvm":
|
||||
ensure => installed,
|
||||
before => Service["libvirtd"],
|
||||
require => [ User["qemu"], Group["qemu"] ],
|
||||
}
|
||||
package { "ruby-libvirt":
|
||||
ensure => installed,
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Operating system not supported")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue