Initial commit - here we can download and extract nutch

This commit is contained in:
7u83 2020-07-16 16:48:01 +00:00
parent 4f2c28b3d9
commit 984ebd5ad2
4 changed files with 57 additions and 0 deletions

10
manifests/init.pp Normal file
View File

@ -0,0 +1,10 @@
#
# init.pp
#
class plnxtools{
file {"opt_dir":
path => "/opt",
ensure => directory
}
}

28
manifests/nutch.pp Normal file
View File

@ -0,0 +1,28 @@
#
# nutch.pp
#
class plnxtools::nutch
() inherits plnxtools::nutch::params
{
class {"plnxtools": }
archive { "/tmp/$filename":
ensure => present,
source => "$urlpath/${filename}",
extract_path => "/opt/",
extract => true,
cleanup => true,
checksum => $checksum,
checksum_type => $checksum_type,
creates => "/opt/${dirname}",
require => [
File['opt_dir']
]
} ->
file { '/opt/nutch':
ensure => link,
target => "/opt/${dirname}",
}
}

16
manifests/nutch/params.pp Normal file
View File

@ -0,0 +1,16 @@
#
# params.pp
#
class plnxtools::nutch::params{
$distfile = "apache-nutch-1.17-bin.tar.gz"
$srcdir = "https://downloads.apache.org/nutch/1.17/"
$checksum = "ab36cd1c158c9e0807313a103189588ccd9a0cd0fa990a0f8bb482dd078f6d701cc5369c3ce0fcac021ed2bc16614572b15b12b5d6929a9085cd43bd8e549fe9"
$checksum_type = "sha512"
$urlpath = "https://downloads.apache.org/nutch/1.17"
$dirname = "apache-nutch-1.17"
$filename = "${dirname}-bin.tar.gz"
}

3
manifests/params.pp Normal file
View File

@ -0,0 +1,3 @@
class planix::params{
}