puppet: Move slash out of $dir by convention.

This commit is contained in:
Alex Vandiver
2021-12-28 01:08:41 +00:00
committed by Tim Abbott
parent bb5a2c8138
commit 3c163a7d5e
7 changed files with 20 additions and 20 deletions

View File

@@ -7,14 +7,14 @@ class zulip::camo (String $listen_address = '0.0.0.0') {
}
$version = '2.3.0'
$dir = "/srv/zulip-go-camo-${version}/"
$bin = "${dir}bin/go-camo"
$dir = "/srv/zulip-go-camo-${version}"
$bin = "${dir}/bin/go-camo"
zulip::external_dep { 'go-camo':
version => $version,
url => "https://github.com/cactus/go-camo/releases/download/v${version}/go-camo-${version}.go1171.linux-${::architecture}.tar.gz",
sha256 => '965506e6edb9d974c810519d71e847afb7ca69d1d01ae7d8be6d7a91de669c0c',
tarball_prefix => "go-camo-${version}/",
tarball_prefix => "go-camo-${version}",
bin => 'bin/go-camo',
}

View File

@@ -6,7 +6,7 @@ define zulip::external_dep(
String $bin = '',
) {
$dir = "/srv/zulip-${title}-${version}/"
$dir = "/srv/zulip-${title}-${version}"
zulip::sha256_tarball_to { $title:
url => $url,
@@ -22,7 +22,7 @@ define zulip::external_dep(
}
if $bin != '' {
file { "${dir}${bin}":
file { "${dir}/${bin}":
ensure => file,
require => File[$dir],
}

View File

@@ -3,14 +3,14 @@
class zulip::golang {
$version = '1.17.3'
$dir = "/srv/zulip-golang-${version}/"
$bin = "${dir}bin/go"
$dir = "/srv/zulip-golang-${version}"
$bin = "${dir}/bin/go"
zulip::external_dep { 'golang':
version => $version,
url => "https://golang.org/dl/go${version}.linux-${::architecture}.tar.gz",
sha256 => '550f9845451c0c94be679faf116291e7807a8d78b43149f9506c1b15eb89008c',
tarball_prefix => 'go/',
tarball_prefix => 'go',
bin => 'bin/go',
}
}

View File

@@ -3,14 +3,14 @@ class zulip::smokescreen {
include zulip::golang
$version = 'dc403015f563eadc556a61870c6ad327688abe88'
$dir = "/srv/zulip-smokescreen-src-${version}/"
$dir = "/srv/zulip-smokescreen-src-${version}"
$bin = "/usr/local/bin/smokescreen-${version}-go-${zulip::golang::version}"
zulip::external_dep { 'smokescreen-src':
version => $version,
url => "https://github.com/stripe/smokescreen/archive/${version}.tar.gz",
sha256 => 'ad4b181d14adcd9425045152b903a343dbbcfcad3c1e7625d2c65d1d50e1959d',
tarball_prefix => "smokescreen-${version}/",
tarball_prefix => "smokescreen-${version}",
}
exec { 'compile smokescreen':

View File

@@ -5,14 +5,14 @@ class zulip_ops::profile::grafana {
include zulip::supervisor
$version = '8.3.2'
$dir = "/srv/zulip-grafana-${version}/"
$bin = "${dir}bin/grafana-server"
$dir = "/srv/zulip-grafana-${version}"
$bin = "${dir}/bin/grafana-server"
zulip::external_dep { 'grafana':
version => $version,
url => "https://dl.grafana.com/oss/release/grafana-${version}.linux-${::architecture}.tar.gz",
sha256 => '100f92c50aa612f213052c55594e58b68b7da641b751c5f144003d704730d189',
tarball_prefix => "grafana-${version}/",
tarball_prefix => "grafana-${version}",
bin => 'bin/grafana-server',
}

View File

@@ -7,20 +7,20 @@ class zulip_ops::profile::prometheus_server {
include zulip_ops::prometheus::base
$version = '2.27.1'
$dir = "/srv/zulip-prometheus-${version}/"
$bin = "${dir}prometheus"
$dir = "/srv/zulip-prometheus-${version}"
$bin = "${dir}/prometheus"
$data_dir = '/var/lib/prometheus'
zulip::external_dep { 'prometheus':
version => $version,
url => "https://github.com/prometheus/prometheus/releases/download/v${version}/prometheus-${version}.linux-${::architecture}.tar.gz",
sha256 => 'ce637d0167d5e6d2561f3bd37e1c58fe8601e13e4e1ea745653c068f6e1317ae',
tarball_prefix => "prometheus-${version}.linux-${::architecture}/",
tarball_prefix => "prometheus-${version}.linux-${::architecture}",
bin => 'prometheus',
}
file { '/usr/local/bin/promtool':
ensure => 'link',
target => "${dir}promtool",
target => "${dir}/promtool",
require => File[$dir],
}
# This was moved to an external dep in 2021/12, and the below can be

View File

@@ -5,14 +5,14 @@ class zulip_ops::prometheus::node {
include zulip::supervisor
$version = '1.1.2'
$dir = "/srv/zulip-node_exporter-${version}/"
$bin = "${dir}node_exporter"
$dir = "/srv/zulip-node_exporter-${version}"
$bin = "${dir}/node_exporter"
zulip::external_dep { 'node_exporter':
version => $version,
url => "https://github.com/prometheus/node_exporter/releases/download/v${version}/node_exporter-${version}.linux-${::architecture}.tar.gz",
sha256 => '8c1f6a317457a658e0ae68ad710f6b4098db2cad10204649b51e3c043aa3e70d',
tarball_prefix => "node_exporter-${version}.linux-${::architecture}/",
tarball_prefix => "node_exporter-${version}.linux-${::architecture}",
bin => 'node_exporter',
}