From: Peter Palfrader Date: Tue, 8 Nov 2016 19:39:17 +0000 (+0000) Subject: Revert "refactor static-components.conf.erb a bit - no logic changes yet" X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=cb556ed8e7a2db65c6af586125128d02b28fbee3;p=mirror%2Fdsa-puppet.git Revert "refactor static-components.conf.erb a bit - no logic changes yet" This reverts commit 6b4b367c4bad827e3917fc6622e01f847f49ce14. --- diff --git a/modules/roles/templates/static-mirroring/static-components.conf.erb b/modules/roles/templates/static-mirroring/static-components.conf.erb index 56a822f23..1656082d1 100644 --- a/modules/roles/templates/static-mirroring/static-components.conf.erb +++ b/modules/roles/templates/static-mirroring/static-components.conf.erb @@ -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