Revert "refactor static-components.conf.erb a bit - no logic changes yet"
authorPeter Palfrader <peter@palfrader.org>
Tue, 8 Nov 2016 19:39:17 +0000 (19:39 +0000)
committerPeter Palfrader <peter@palfrader.org>
Tue, 8 Nov 2016 19:39:17 +0000 (19:39 +0000)
This reverts commit 6b4b367c4bad827e3917fc6622e01f847f49ce14.

modules/roles/templates/static-mirroring/static-components.conf.erb

index 56a822f..1656082 100644 (file)
@@ -22,10 +22,10 @@ config['components'].each_pair do |component, conf|
        srchost, srcpath = conf['source'].split(':', 2)
 
        config['mirrors'].each do |mirror, mc|
-               if mirrors.include?(mirror)
-                       if mc.has_key?('components-include') and not mc['components-include'].include?(component)
-                               conf['exclude-mirrors'] << mirror
-                       end
+               next unless mirrors.include?(mirror)
+
+               if mc.has_key?('components-include') and not mc['components-include'].include?(component)
+                       conf['exclude-mirrors'] << mirror
                end
        end