vsroom: Drop support for EL5

This commit is contained in:
Ossi Salmi 2014-12-03 20:54:02 +02:00
parent 23be5956c7
commit ee508e116f
2 changed files with 20 additions and 17 deletions

View file

@ -93,7 +93,7 @@ define python::setup::install($python="python", $source="") {
exec { "python-setup-install-${name}":
path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin",
cwd => $name,
command => "/bin/sh -c 'umask 022; ${python} setup.py install'",
command => "/bin/sh -c 'umask 022; ${python} setup.py install && mkdir -p build'",
creates => "${name}/build",
}

View file

@ -8,18 +8,22 @@
# $boshurl:
# XMPP BOSH path. Defaults to "/bosh/".
#
# $config:
# Source URL of custom config file.
#
# $webhosts:
# List of vsroom virtual hosts
# List of vsroom virtual hosts.
#
class vsroom(
$authurl="/collab/?action=authcredentials",
$boshurl="/bosh/",
$webhosts=undef
$config=undef,
$webhosts=undef,
) {
if !$vsroom_package {
if $vsroom_package_latest {
$vsroom_package = $vsroom_package_latest
if ! $vsroom_package {
if $::vsroom_package_latest {
$vsroom_package = $::vsroom_package_latest
} else {
fail("Must define \$vsroom_package or \$vsroom_package_latest")
}
@ -37,17 +41,9 @@ class vsroom(
strip => 1,
source => "/usr/local/src/vsroom.tar.gz",
require => File["/usr/local/src/vsroom.tar.gz"],
before => Python::Setup::Install["/usr/local/src/vsroom"],
}
if $::operatingsystem in ["CentOS","RedHat"] and versioncmp($::operatingsystemrelease, "6") < 0 {
include python::python26
python::setup::install { "/usr/local/src/vsroom":
python => "python2.6",
require => Package["python26"],
}
} else {
python::setup::install { "/usr/local/src/vsroom": }
python::setup::install { "/usr/local/src/vsroom":
require => Util::Extract::Tar["/usr/local/src/vsroom"],
}
$htdocs = $::operatingsystem ? {
@ -55,12 +51,19 @@ class vsroom(
default => "/usr/share/vsroom/htdocs",
}
if $config {
$config_content = undef
} else {
$config_content = template("vsroom/config.json.erb")
}
file { "${htdocs}/config.json":
ensure => present,
mode => "0644",
owner => "root",
group => "root",
content => template("vsroom/config.json.erb"),
source => $config,
content => $config_content,
require => Python::Setup::Install["/usr/local/src/vsroom"],
}