Fix python 2.6 usage on CentOS 5

This commit is contained in:
Ossi Salmi 2013-10-10 15:15:39 +03:00
parent 16644e0ad6
commit b0f01e7318
4 changed files with 45 additions and 48 deletions

View file

@ -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