Skip to content

Commit

Permalink
process exporter name depends on version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Alfke committed Jun 23, 2018
1 parent 8105cb7 commit c82bf6b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion manifests/process_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,14 @@
Stdlib::Absolutepath $bin_dir = $prometheus::bin_dir,
) inherits prometheus {

$real_download_url = pick($download_url,"${download_url_base}/download/v${version}/${package_name}-${version}.${os}-${arch}.${download_extension}")
# Prometheus removed a dot on the realease name at 0.2.0
if versioncmp ($version, '0.2.0') >= 0 {
$filename = "${package_name}-${version}${os}_${arch}.${download_extension}"
}
else {
$filename = "${package_name}-${version}.${os}-${arch}.${download_extension}"
}
$real_download_url = pick($download_url,"${download_url_base}/download/v${version}/${filename}")
$notify_service = $restart_on_change ? {
true => Service['process-exporter'],
default => undef,
Expand Down

0 comments on commit c82bf6b

Please sign in to comment.