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}" $dir = "/srv/zulip-${title}-${version}"
zulip::sha256_tarball_to { $title: zulip::sha256_tarball_to { $title:
url => $url, url => $url,
sha256 => $sha256_filled, sha256 => $sha256_filled,
install => { install_from => $tarball_prefix,
$tarball_prefix => $dir, install_to => $dir,
},
} }
file { $dir: file { $dir:

View File

@@ -3,14 +3,12 @@
define zulip::sha256_tarball_to( define zulip::sha256_tarball_to(
String $sha256, String $sha256,
String $url, 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: exec { $url:
command => "${::zulip_scripts_path}/setup/sha256-tarball-to ${sha256} ${url} ${install_expanded}", command => "${::zulip_scripts_path}/setup/sha256-tarball-to ${sha256} ${url} ${install_from} ${install_to}",
creates => $a_file, creates => $install_to,
timeout => 600, timeout => 600,
} }
} }