vsroom: Drop support for EL5
This commit is contained in:
parent
23be5956c7
commit
ee508e116f
2 changed files with 20 additions and 17 deletions
|
@ -93,7 +93,7 @@ define python::setup::install($python="python", $source="") {
|
||||||
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 => "/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",
|
creates => "${name}/build",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,18 +8,22 @@
|
||||||
# $boshurl:
|
# $boshurl:
|
||||||
# XMPP BOSH path. Defaults to "/bosh/".
|
# XMPP BOSH path. Defaults to "/bosh/".
|
||||||
#
|
#
|
||||||
|
# $config:
|
||||||
|
# Source URL of custom config file.
|
||||||
|
#
|
||||||
# $webhosts:
|
# $webhosts:
|
||||||
# List of vsroom virtual hosts
|
# List of vsroom virtual hosts.
|
||||||
#
|
#
|
||||||
class vsroom(
|
class vsroom(
|
||||||
$authurl="/collab/?action=authcredentials",
|
$authurl="/collab/?action=authcredentials",
|
||||||
$boshurl="/bosh/",
|
$boshurl="/bosh/",
|
||||||
$webhosts=undef
|
$config=undef,
|
||||||
|
$webhosts=undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if ! $vsroom_package {
|
if ! $vsroom_package {
|
||||||
if $vsroom_package_latest {
|
if $::vsroom_package_latest {
|
||||||
$vsroom_package = $vsroom_package_latest
|
$vsroom_package = $::vsroom_package_latest
|
||||||
} else {
|
} else {
|
||||||
fail("Must define \$vsroom_package or \$vsroom_package_latest")
|
fail("Must define \$vsroom_package or \$vsroom_package_latest")
|
||||||
}
|
}
|
||||||
|
@ -37,17 +41,9 @@ class vsroom(
|
||||||
strip => 1,
|
strip => 1,
|
||||||
source => "/usr/local/src/vsroom.tar.gz",
|
source => "/usr/local/src/vsroom.tar.gz",
|
||||||
require => File["/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::setup::install { "/usr/local/src/vsroom":
|
||||||
python => "python2.6",
|
require => Util::Extract::Tar["/usr/local/src/vsroom"],
|
||||||
require => Package["python26"],
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
python::setup::install { "/usr/local/src/vsroom": }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$htdocs = $::operatingsystem ? {
|
$htdocs = $::operatingsystem ? {
|
||||||
|
@ -55,12 +51,19 @@ class vsroom(
|
||||||
default => "/usr/share/vsroom/htdocs",
|
default => "/usr/share/vsroom/htdocs",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $config {
|
||||||
|
$config_content = undef
|
||||||
|
} else {
|
||||||
|
$config_content = template("vsroom/config.json.erb")
|
||||||
|
}
|
||||||
|
|
||||||
file { "${htdocs}/config.json":
|
file { "${htdocs}/config.json":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
mode => "0644",
|
mode => "0644",
|
||||||
owner => "root",
|
owner => "root",
|
||||||
group => "root",
|
group => "root",
|
||||||
content => template("vsroom/config.json.erb"),
|
source => $config,
|
||||||
|
content => $config_content,
|
||||||
require => Python::Setup::Install["/usr/local/src/vsroom"],
|
require => Python::Setup::Install["/usr/local/src/vsroom"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue