OSDN Git Service

- adds the `['docker-grid']['dockerproject']['apt_new_repo_sections']` attribute.
[metasearch/grid-chef-repo.git] / cookbooks / docker-grid / recipes / engine.rb
index 9fe312c..d7f9654 100644 (file)
@@ -116,6 +116,8 @@ end
 
 case platform_family
 when 'rhel'
+  ex_enablerepo = node['docker-grid']['dockerproject']['yum_new_repo_extra_enablerepo']
+
   if storage_driver == 'devicemapper'
     [
       #'yum-utils',
@@ -179,7 +181,9 @@ when 'rhel'
         allow_downgrade true
         action :install
         version docker_ver unless docker_ver.empty?
-        # dockerrepo is disabled by default to prevent automatic update.
+        # for the new repository
+        options "--enablerepo=#{ex_enablerepo}" if enable_new_repo && !ex_enablerepo.nil? && !ex_enablerepo.empty?
+        # old dockerrepo is disabled by default to prevent automatic update.
         options '--enablerepo=dockerrepo' unless enable_new_repo
         notifies :run, 'bash[clean_up_docker0_bridge]', :before if pkg == 'docker-engine' || pkg == 'docker-ce'
       end