Merged in oherrala/puppet (pull request #6)
This commit is contained in:
commit
2758fb1a35
3 changed files with 23 additions and 8 deletions
|
@ -29,11 +29,26 @@ class libvirt::client {
|
||||||
#
|
#
|
||||||
class libvirt::kvm inherits libvirt::client {
|
class libvirt::kvm inherits libvirt::client {
|
||||||
|
|
||||||
|
case operatingsystem {
|
||||||
|
centos,fedora: {
|
||||||
|
case $operatingsystemrelease {
|
||||||
|
'/5\.[0-9]+/': {
|
||||||
|
package { "kvm":
|
||||||
|
ensure => installed,
|
||||||
|
before => Service["libvirtd"],
|
||||||
|
require => [ User["qemu"], Group["qemu"] ],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default: {
|
||||||
package { "qemu-kvm":
|
package { "qemu-kvm":
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
before => Service["libvirtd"],
|
before => Service["libvirtd"],
|
||||||
require => [ User["qemu"], Group["qemu"] ],
|
require => [ User["qemu"], Group["qemu"] ],
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if !$libvirt_admingroup {
|
if !$libvirt_admingroup {
|
||||||
$libvirt_admingroup = "root"
|
$libvirt_admingroup = "root"
|
||||||
|
|
|
@ -15,8 +15,8 @@ define python::setup::install($python="python") {
|
||||||
|
|
||||||
exec { "python-setup-install-${name}":
|
exec { "python-setup-install-${name}":
|
||||||
path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin",
|
path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin",
|
||||||
cwd => $name,
|
cwd => "${name}",
|
||||||
command => "${python} setup.py install",
|
command => "/bin/sh -c 'umask 022; ${python} setup.py install'",
|
||||||
creates => "${name}/build",
|
creates => "${name}/build",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,9 +57,9 @@ define util::extract::tar($source, $ensure=present, $strip=0, $preserve=false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if $preserve {
|
if $preserve {
|
||||||
$command = "${cat} ${source} | ${tar} xf - --strip-components=${strip} -C ${name}"
|
$command = "/bin/sh -c 'umask 022; ${cat} ${source} | ${tar} xf - --strip-components=${strip} -C ${name}'"
|
||||||
} else {
|
} else {
|
||||||
$command = "${cat} ${source} | ${tar} xf - --strip-components=${strip} -C ${name} --no-same-owner --no-same-permissions"
|
$command = "/bin/sh -c 'umask 022; ${cat} ${source} | ${tar} xf - --strip-components=${strip} -C ${name} --no-same-owner --no-same-permissions'"
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "tar-extract-${name}":
|
exec { "tar-extract-${name}":
|
||||||
|
|
Loading…
Add table
Reference in a new issue