Fix python 2.6 usage on CentOS 5
This commit is contained in:
parent
16644e0ad6
commit
b0f01e7318
4 changed files with 45 additions and 48 deletions
|
@ -16,20 +16,6 @@ class abusehelper {
|
|||
ensure => installed,
|
||||
}
|
||||
}
|
||||
"centos","redhat": {
|
||||
case $::operatingsystemrelease {
|
||||
/^5/: {
|
||||
package { "python26":
|
||||
ensure => installed,
|
||||
}
|
||||
Python::Setup::Install["/usr/local/src/abusehelper",
|
||||
"/usr/local/src/idiokit"] {
|
||||
python => "python2.6",
|
||||
require => Package["python26"],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !$abusehelper_package {
|
||||
|
@ -82,8 +68,18 @@ class abusehelper {
|
|||
require => File["/usr/local/src/idiokit.tar.gz"],
|
||||
before => Python::Setup::Install["/usr/local/src/idiokit"],
|
||||
}
|
||||
python::setup::install { [ "/usr/local/src/abusehelper",
|
||||
"/usr/local/src/idiokit", ]:
|
||||
|
||||
if $::operatingsystem in ["CentOS","RedHat"] and versioncmp($::operatingsystemrelease, "6") < 0 {
|
||||
include python::python26
|
||||
python::setup::install { [ "/usr/local/src/abusehelper",
|
||||
"/usr/local/src/idiokit", ]:
|
||||
python => "python2.6",
|
||||
require => Package["python26"],
|
||||
}
|
||||
} else {
|
||||
python::setup::install { [ "/usr/local/src/abusehelper",
|
||||
"/usr/local/src/idiokit", ]:
|
||||
}
|
||||
}
|
||||
|
||||
include user::system
|
||||
|
|
|
@ -10,22 +10,6 @@
|
|||
#
|
||||
class abusesa {
|
||||
|
||||
case $::operatingsystem {
|
||||
"centos","redhat": {
|
||||
case $::operatingsystemrelease {
|
||||
/^5/: {
|
||||
package { "python26":
|
||||
ensure => installed,
|
||||
}
|
||||
Python::Setup::Install["/usr/local/src/abusesa"] {
|
||||
python => "python2.6",
|
||||
require => Package["python26"],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !$abusesa_package {
|
||||
if $abusesa_package_latest {
|
||||
$abusesa_package = $abusesa_package_latest
|
||||
|
@ -86,7 +70,16 @@ class abusesa {
|
|||
require => File["/usr/local/src/abusesa.tar.gz"],
|
||||
before => Python::Setup::Install["/usr/local/src/abusesa"],
|
||||
}
|
||||
python::setup::install { "/usr/local/src/abusesa": }
|
||||
|
||||
if $::operatingsystem in ["CentOS","RedHat"] and versioncmp($::operatingsystemrelease, "6") < 0 {
|
||||
include python::python26
|
||||
python::setup::install { "/usr/local/src/abusesa":
|
||||
python => "python2.6",
|
||||
require => Package["python26"],
|
||||
}
|
||||
} else {
|
||||
python::setup::install { "/usr/local/src/abusesa": }
|
||||
}
|
||||
|
||||
if $abusesa_botnets {
|
||||
class { "abusehelper::init":
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# Install python
|
||||
#
|
||||
class python {
|
||||
|
@ -22,6 +21,19 @@ class python {
|
|||
}
|
||||
|
||||
|
||||
# Install python 2.6 for RHEL/CentOS 5
|
||||
#
|
||||
class python::python26 {
|
||||
|
||||
if $::operatingsystem in ["CentOS","RedHat"] and versioncmp($::operatingsystemrelease, "6") < 0 {
|
||||
package { "python26":
|
||||
ensure => installed,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install m2crypto module for python.
|
||||
#
|
||||
class python::m2crypto {
|
||||
|
|
|
@ -15,19 +15,6 @@ class vsroom($authurl="/collab/?action=authcredentials",
|
|||
$boshurl="/bosh/",
|
||||
$webhosts=undef) {
|
||||
|
||||
case $::operatingsystem {
|
||||
"centos","redhat": {
|
||||
case $::operatingsystemrelease {
|
||||
/^5/: {
|
||||
Python::Setup::Install["/usr/local/src/vsroom"] {
|
||||
python => "python2.6",
|
||||
require => Package["python26"],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !$vsroom_package {
|
||||
if $vsroom_package_latest {
|
||||
$vsroom_package = $vsroom_package_latest
|
||||
|
@ -50,7 +37,16 @@ class vsroom($authurl="/collab/?action=authcredentials",
|
|||
require => File["/usr/local/src/vsroom.tar.gz"],
|
||||
before => Python::Setup::Install["/usr/local/src/vsroom"],
|
||||
}
|
||||
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": }
|
||||
}
|
||||
|
||||
$htdocs = $::operatingsystem ? {
|
||||
"ubuntu" => "/usr/local/share/vsroom/htdocs",
|
||||
|
|
Loading…
Add table
Reference in a new issue