manifests/internal/module/assemble/process_artifacts.pp
# Internal define - processing artifacts
define jboss::internal::module::assemble::process_artifacts (
$dir,
$uri = $name,
) {
include jboss
$base = jboss_basename($uri)
$target_dir = "${jboss::home}/${dir}"
if $uri =~ /^(?:http|https|ftp|sftp|ftps):/ {
jboss::internal::util::fetch::file { $base:
address => $uri,
fetch_dir => $target_dir,
notify => Service[$jboss::product],
require => Anchor['jboss::package::end'],
}
} else {
file { "${target_dir}/${base}":
source => $uri,
mode => '0640',
owner => $jboss::jboss_user,
group => $jboss::jboss_group,
notify => Service[$jboss::product],
}
}
}