From 29a674a0b5163aeb402f188f1ed691adc6e29c70 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Tue, 8 Nov 2011 12:55:04 +0200 Subject: [PATCH] Fixed abusehelper and vsroom modules for CentOS 6 --- abusehelper/manifests/init.pp | 21 +++++++++++---------- vsroom/manifests/init.pp | 25 +++++++++++++++---------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/abusehelper/manifests/init.pp b/abusehelper/manifests/init.pp index 3f28987..36feed6 100644 --- a/abusehelper/manifests/init.pp +++ b/abusehelper/manifests/init.pp @@ -9,8 +9,17 @@ class abusehelper { } } centos: { - package { "python26": - ensure => installed, + case $operatingsystemrelease { + /^5/: { + package { "python26": + ensure => installed, + } + Python::Setup::Install["/usr/local/src/abusehelper", + "/usr/local/src/idiokit"] { + python => "python2.6", + require => Package["python26"], + } + } } } } @@ -45,14 +54,6 @@ class abusehelper { } python::setup::install { [ "/usr/local/src/abusehelper", "/usr/local/src/idiokit", ]: - python => $operatingsystem ? { - centos => "python2.6", - default => "python", - }, - require => $operatingsystem ? { - centos => Package["python26"], - default => undef, - }, } include user::system diff --git a/vsroom/manifests/init.pp b/vsroom/manifests/init.pp index 545ba2c..cd2a922 100644 --- a/vsroom/manifests/init.pp +++ b/vsroom/manifests/init.pp @@ -4,6 +4,19 @@ class vsroom { require abusehelper + case $operatingsystem { + centos: { + case $operatingsystemrelease { + /^5/: { + Python::Setup::Install["/usr/local/src/vsroom"] { + python => "python2.6", + require => Package["python26"], + } + } + } + } + } + file { "/usr/local/src/vsroom.tar.gz": ensure => present, mode => 0644, @@ -18,16 +31,8 @@ class vsroom { require => File["/usr/local/src/vsroom.tar.gz"], before => Python::Setup::Install["/usr/local/src/vsroom"], } - python::setup::install { "/usr/local/src/vsroom": - python => $operatingsystem ? { - centos => "python2.6", - default => "python", - }, - require => $operatingsystem ? { - centos => Package["python26"], - default => undef, - }, - } + python::setup::install { "/usr/local/src/vsroom": } + file { "/usr/local/bin/vsroomctl": ensure => present, mode => 0755,