Skip to content

Commit

Permalink
node-exporter have a 'v' in the release name since 0.13.0 (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
NairolfL authored and brutus333 committed Dec 27, 2016
1 parent c941249 commit 70a2bd2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions manifests/node_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# [*arch*]
# Architecture (amd64 or i386)
#

# [*bin_dir*]
# Directory where binaries are located
#
Expand Down Expand Up @@ -96,8 +97,14 @@
$user = $::prometheus::params::node_exporter_user,
$version = $::prometheus::params::node_exporter_version,
) inherits prometheus::params {
#Please provide the download_url for versions < 0.13.0
$real_download_url = pick($download_url,"${download_url_base}/download/v${version}/${package_name}-${version}.${os}-${arch}.${download_extension}")
# Prometheus added a 'v' on the realease name at 0.13.0
if versioncmp ($version, '0.13.0') >= 0 {
$release = "v${version}"
}
else {
$release = $version
}
$real_download_url = pick($download_url,"${download_url_base}/download/${release}/${package_name}-${version}.${os}-${arch}.${download_extension}")
validate_bool($purge_config_dir)
validate_bool($manage_user)
validate_bool($manage_service)
Expand Down

0 comments on commit 70a2bd2

Please sign in to comment.