puppet: sha256_tarball_to is only ever called with one from/to.

This commit is contained in:
Alex Vandiver
2023-01-28 00:43:43 +00:00
committed by Tim Abbott
parent 840884ec89
commit af0ba0b58f
2 changed files with 8 additions and 11 deletions

View File

@@ -22,11 +22,10 @@ define zulip::external_dep(
$dir = "/srv/zulip-${title}-${version}"
zulip::sha256_tarball_to { $title:
url => $url,
sha256 => $sha256_filled,
install => {
$tarball_prefix => $dir,
},
url => $url,
sha256 => $sha256_filled,
install_from => $tarball_prefix,
install_to => $dir,
}
file { $dir:

View File

@@ -3,14 +3,12 @@
define zulip::sha256_tarball_to(
String $sha256,
String $url,
Hash[String, String] $install,
String $install_from,
String $install_to,
) {
$install_expanded = $install.convert_to(Array).join(' ')
# Puppet does not support `creates => [...]`, so we have to pick one
$a_file = $install[keys($install)[0]]
exec { $url:
command => "${::zulip_scripts_path}/setup/sha256-tarball-to ${sha256} ${url} ${install_expanded}",
creates => $a_file,
command => "${::zulip_scripts_path}/setup/sha256-tarball-to ${sha256} ${url} ${install_from} ${install_to}",
creates => $install_to,
timeout => 600,
}
}