generic install added

This commit is contained in:
7u83 2020-07-23 16:40:15 +00:00
parent ce08c1e093
commit abf894e4dc
2 changed files with 43 additions and 0 deletions

View File

@ -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}",
}
}

View File

@ -14,3 +14,5 @@ class plnxtools::nutch::params{
}