From dea0381d2689a8410752e4cad8a6acde85ab45e4 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 8 Jan 2016 11:20:51 -0600 Subject: [PATCH] Warn if no checksum is provided Emit a warning if someone uses a version of ES for which we don't have a checksum. Fixes #404. --- libraries/provider_install.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/provider_install.rb b/libraries/provider_install.rb index 3d86ae2dc..5ae3d62d9 100644 --- a/libraries/provider_install.rb +++ b/libraries/provider_install.rb @@ -44,6 +44,10 @@ def install_package_wrapper_action checksum = determine_download_checksum(new_resource, node) package_options = new_resource.package_options + unless checksum + Chef::Log.warn("No checksum was provided for #{download_url}, this may download a new package on every chef run!") + end + remote_file_r = remote_file "#{Chef::Config[:file_cache_path]}/#{filename}" do source download_url checksum checksum