'hypercontainer' => node['hypercontainer']['package']['hypercontainer'],
'hyperstart' => node['hypercontainer']['package']['hyperstart'],
}
+hc_pkg_file_paths = []
hc_pkgs.each {|pkg_name, pkg_file|
pkg_file_path = "#{file_cache_path}/#{pkg_file}"
+ hc_pkg_file_paths.push(pkg_file_path)
remote_file pkg_file_path do
source "#{download_url_context}/#{pkg_file}"
provider Chef::Provider::Package::Dpkg if platform_family == 'debian'
source pkg_file_path
action :nothing
- notifies :create, "remote_file[#{pkg_file_path}]", :before
if pkg_name == 'hyperstart'
notifies :enable, 'service[hyperd]', :delayed
notifies :restart, 'service[hyperd]', :delayed
log 'install_hypercontainer_packages.' do
action :nothing
not_if "hyperctl version | grep #{expected_ver}"
- notifies :upgrade, 'package[hypercontainer]', :immediately
- notifies :upgrade, 'package[hyperstart]', :immediately
+ hc_pkg_file_paths.each {|pkg_file_path|
+ notifies :create, "remote_file[#{pkg_file_path}]", :before
+ }
+ hc_pkgs.each {|pkg_name, pkg_file|
+ notifies :upgrade, "package[#{pkg_name}]", :immediately
+ }
end
if install_flavor == 'script'