From 984ebd5ad212f8c891cdac4ca76148ee519c5721 Mon Sep 17 00:00:00 2001 From: 7u83 <7u83@mail.ru> Date: Thu, 16 Jul 2020 16:48:01 +0000 Subject: [PATCH] Initial commit - here we can download and extract nutch --- manifests/init.pp | 10 ++++++++++ manifests/nutch.pp | 28 ++++++++++++++++++++++++++++ manifests/nutch/params.pp | 16 ++++++++++++++++ manifests/params.pp | 3 +++ 4 files changed, 57 insertions(+) create mode 100644 manifests/init.pp create mode 100644 manifests/nutch.pp create mode 100644 manifests/nutch/params.pp create mode 100644 manifests/params.pp diff --git a/manifests/init.pp b/manifests/init.pp new file mode 100644 index 0000000..7579dce --- /dev/null +++ b/manifests/init.pp @@ -0,0 +1,10 @@ +# +# init.pp +# + +class plnxtools{ + file {"opt_dir": + path => "/opt", + ensure => directory + } +} diff --git a/manifests/nutch.pp b/manifests/nutch.pp new file mode 100644 index 0000000..4ffba37 --- /dev/null +++ b/manifests/nutch.pp @@ -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}", + } +} diff --git a/manifests/nutch/params.pp b/manifests/nutch/params.pp new file mode 100644 index 0000000..f209653 --- /dev/null +++ b/manifests/nutch/params.pp @@ -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" + +} + diff --git a/manifests/params.pp b/manifests/params.pp new file mode 100644 index 0000000..61b3dd2 --- /dev/null +++ b/manifests/params.pp @@ -0,0 +1,3 @@ + +class planix::params{ +}