OSDN Git Service

bug fix. hypercontainer-0.2.1
authorwhitestar <whitestar@users.osdn.me>
Fri, 1 Dec 2017 14:22:03 +0000 (23:22 +0900)
committerwhitestar <whitestar@users.osdn.me>
Fri, 1 Dec 2017 14:22:03 +0000 (23:22 +0900)
cookbooks/hypercontainer/CHANGELOG.md
cookbooks/hypercontainer/recipes/default.rb
cookbooks/hypercontainer/version

index 0819e8a..a412051 100644 (file)
@@ -1,5 +1,9 @@
 # hypercontainer CHANGELOG
 
+0.2.1
+-----
+- bug fix.
+
 0.2.0
 -----
 - bumps up hypercontainer version.
index 3d2d3e1..d216ab9 100644 (file)
@@ -61,8 +61,10 @@ hc_pkgs = {
   '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}"
@@ -77,7 +79,6 @@ hc_pkgs.each {|pkg_name, 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
@@ -89,8 +90,12 @@ hc_pkgs.each {|pkg_name, pkg_file|
 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'