From abf894e4dc64de75da8c754e4f79de956f1279b2 Mon Sep 17 00:00:00 2001 From: 7u83 <7u83@mail.ru> Date: Thu, 23 Jul 2020 16:40:15 +0000 Subject: [PATCH] generic install added --- manifests/init.pp | 41 +++++++++++++++++++++++++++++++++++++++ manifests/nutch/params.pp | 2 ++ 2 files changed, 43 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 3c328bb..04f0df1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -18,4 +18,45 @@ class plnxtools{ } } + package { 'openjdk11': + ensure => installed + } + } + + +define plnxtools::install +( + $distfile, + $sourcedir, + $dirname, + $sourcefile="${sourcedir}/${distfile}", + + $opt_dir = "/opt", + + $checksum = undef, + $checksum_type = undef, + +) +{ + + archive { "/tmp/$distfile": + ensure => present, + source => $sourcefile, + extract_path => $opt_dir, + extract => true, + cleanup => true, + checksum => $checksum, + checksum_type => $checksum_type, + creates => "${opt_dir}/${dirname}", +# require => [ +# File['opt_dir'] +# ] + } -> + file { "/opt/$title": + ensure => link, + target => "/opt/${dirname}", + } +} + + diff --git a/manifests/nutch/params.pp b/manifests/nutch/params.pp index f209653..cda9989 100644 --- a/manifests/nutch/params.pp +++ b/manifests/nutch/params.pp @@ -14,3 +14,5 @@ class plnxtools::nutch::params{ } + +