Merged in osalmi/puppet/feature-pip-install-abusehelper (pull request #70)
abusehelper: Install idiokit and abusehelper using pip
This commit is contained in:
commit
dbe979d2c4
1 changed files with 4 additions and 52 deletions
|
@ -33,60 +33,12 @@ class abusehelper(
|
|||
}
|
||||
}
|
||||
|
||||
file { '/usr/local/src/abusehelper.tar.gz':
|
||||
ensure => present,
|
||||
mode => '0644',
|
||||
owner => 'root',
|
||||
group => $::operatingsystem ? {
|
||||
'openbsd' => 'wheel',
|
||||
default => 'root',
|
||||
},
|
||||
python::pip::install { 'idiokit.tar.gz':
|
||||
source => "puppet:///files/packages/${idiokit_package}",
|
||||
} ->
|
||||
python::pip::install { 'abusehelper.tar.gz':
|
||||
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
|
||||
realize(User['abusehel'], Group['abusehel'])
|
||||
|
|
Loading…
Add table
Reference in a new issue