abusehelper: Install idiokit and abusehelper using pip
This commit is contained in:
parent
f0a48f506c
commit
995a242e46
1 changed files with 4 additions and 52 deletions
|
@ -33,60 +33,12 @@ class abusehelper(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/usr/local/src/abusehelper.tar.gz':
|
python::pip::install { 'idiokit.tar.gz':
|
||||||
ensure => present,
|
source => "puppet:///files/packages/${idiokit_package}",
|
||||||
mode => '0644',
|
} ->
|
||||||
owner => 'root',
|
python::pip::install { 'abusehelper.tar.gz':
|
||||||
group => $::operatingsystem ? {
|
|
||||||
'openbsd' => 'wheel',
|
|
||||||
default => 'root',
|
|
||||||
},
|
|
||||||
source => "puppet:///files/packages/${abusehelper_package}",
|
source => "puppet:///files/packages/${abusehelper_package}",
|
||||||
}
|
}
|
||||||
util::extract::tar { '/usr/local/src/abusehelper':
|
|
||||||
ensure => latest,
|
|
||||||
strip => '1',
|
|
||||||
source => '/usr/local/src/abusehelper.tar.gz',
|
|
||||||
require => File['/usr/local/src/abusehelper.tar.gz'],
|
|
||||||
before => Python::Setup::Install['/usr/local/src/abusehelper'],
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/usr/local/src/idiokit.tar.gz':
|
|
||||||
ensure => present,
|
|
||||||
mode => '0644',
|
|
||||||
owner => 'root',
|
|
||||||
group => $::operatingsystem ? {
|
|
||||||
'openbsd' => 'wheel',
|
|
||||||
default => 'root',
|
|
||||||
},
|
|
||||||
source => "puppet:///files/packages/${idiokit_package}",
|
|
||||||
}
|
|
||||||
util::extract::tar { '/usr/local/src/idiokit':
|
|
||||||
ensure => latest,
|
|
||||||
strip => '1',
|
|
||||||
source => '/usr/local/src/idiokit.tar.gz',
|
|
||||||
require => File['/usr/local/src/idiokit.tar.gz'],
|
|
||||||
before => Python::Setup::Install['/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',
|
|
||||||
]: }
|
|
||||||
}
|
|
||||||
|
|
||||||
Python::Setup::Install['/usr/local/src/idiokit'] ->
|
|
||||||
Python::Setup::Install['/usr/local/src/abusehelper']
|
|
||||||
|
|
||||||
include user::system
|
include user::system
|
||||||
realize(User['abusehel'], Group['abusehel'])
|
realize(User['abusehel'], Group['abusehel'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue