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,
|
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 {
|
if !$abusehelper_package {
|
||||||
|
@ -82,8 +68,18 @@ class abusehelper {
|
||||||
require => File["/usr/local/src/idiokit.tar.gz"],
|
require => File["/usr/local/src/idiokit.tar.gz"],
|
||||||
before => Python::Setup::Install["/usr/local/src/idiokit"],
|
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
|
include user::system
|
||||||
|
|
|
@ -10,22 +10,6 @@
|
||||||
#
|
#
|
||||||
class abusesa {
|
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 {
|
||||||
if $abusesa_package_latest {
|
if $abusesa_package_latest {
|
||||||
$abusesa_package = $abusesa_package_latest
|
$abusesa_package = $abusesa_package_latest
|
||||||
|
@ -86,7 +70,16 @@ class abusesa {
|
||||||
require => File["/usr/local/src/abusesa.tar.gz"],
|
require => File["/usr/local/src/abusesa.tar.gz"],
|
||||||
before => Python::Setup::Install["/usr/local/src/abusesa"],
|
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 {
|
if $abusesa_botnets {
|
||||||
class { "abusehelper::init":
|
class { "abusehelper::init":
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
# Install python
|
# Install python
|
||||||
#
|
#
|
||||||
class 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.
|
# Install m2crypto module for python.
|
||||||
#
|
#
|
||||||
class python::m2crypto {
|
class python::m2crypto {
|
||||||
|
|
|
@ -15,19 +15,6 @@ class vsroom($authurl="/collab/?action=authcredentials",
|
||||||
$boshurl="/bosh/",
|
$boshurl="/bosh/",
|
||||||
$webhosts=undef) {
|
$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 {
|
||||||
if $vsroom_package_latest {
|
if $vsroom_package_latest {
|
||||||
$vsroom_package = $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"],
|
require => File["/usr/local/src/vsroom.tar.gz"],
|
||||||
before => Python::Setup::Install["/usr/local/src/vsroom"],
|
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 ? {
|
$htdocs = $::operatingsystem ? {
|
||||||
"ubuntu" => "/usr/local/share/vsroom/htdocs",
|
"ubuntu" => "/usr/local/share/vsroom/htdocs",
|
||||||
|
|
Loading…
Add table
Reference in a new issue