From 4ac67e9a1acf5f9233150346d06e41a890545d86 Mon Sep 17 00:00:00 2001 From: Samuel Krieg Date: Thu, 25 Apr 2019 20:25:09 +0200 Subject: [PATCH] Downloading requires the GPG key This commit makes sure the Hashicorp key exists on the system before downloading files. Without this "require" parameter, there are chances that the hashicorp key does not exist yet on the machine, thus failing the Puppet run. --- manifests/download.pp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/manifests/download.pp b/manifests/download.pp index 85889ee..bd3e6b8 100644 --- a/manifests/download.pp +++ b/manifests/download.pp @@ -25,9 +25,10 @@ $binfile = "${name}_${version}/${name}" exec { "download ${name} ${version}": - command => "/usr/local/bin/hashicorp-download.sh ${cache_dir} ${name} ${version} ${_os} ${_arch}", - path => ['/bin', '/usr/bin'], - creates => "${cache_dir}/${name}_${version}/${name}", + command => "/usr/local/bin/hashicorp-download.sh ${cache_dir} ${name} ${version} ${_os} ${_arch}", + path => ['/bin', '/usr/bin'], + creates => "${cache_dir}/${name}_${version}/${name}", + require => Gnupg_key['hashicorp'], } file { "${install_dir}/${name}-${version}":