Skip to content

Commit 292a4cf

Browse files
authored
Merge pull request grafana#11 from LDaneliukas/patch-1
Modify the type of archive depending on release version
2 parents e30cd05 + 040af11 commit 292a4cf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

manifests/install.pp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,19 @@
1717
$version_dir = "${data_dir}/promtail-${promtail::version}"
1818
$binary_path = "${version_dir}/${release_file_name}"
1919

20+
if versioncmp($promtail::version, 'v1.0.0') > 0 {
21+
$archive_type = 'zip'
22+
} else {
23+
$archive_type = 'gz'
24+
}
25+
2026
file { [$data_dir, $version_dir]:
2127
ensure => directory,
2228
}
2329

2430
archive { "${binary_path}.gz":
2531
ensure => present,
26-
source => "https://github.com/grafana/loki/releases/download/${promtail::version}/${release_file_name}.gz",
32+
source => "https://github.com/grafana/loki/releases/download/${promtail::version}/${release_file_name}.${archive_type}",
2733
extract => true,
2834
extract_path => $version_dir,
2935
creates => $binary_path,

0 commit comments

Comments
 (0)