From: Peter Palfrader Date: Tue, 8 Nov 2016 19:28:14 +0000 (+0100) Subject: refactor static-components.conf.erb a bit - no logic changes yet X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=6b4b367c4bad827e3917fc6622e01f847f49ce14;p=mirror%2Fdsa-puppet.git refactor static-components.conf.erb a bit - no logic changes yet --- diff --git a/modules/roles/templates/static-mirroring/static-components.conf.erb b/modules/roles/templates/static-mirroring/static-components.conf.erb index 1656082d1..56a822f23 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| - next unless mirrors.include?(mirror) - - if mc.has_key?('components-include') and not mc['components-include'].include?(component) - conf['exclude-mirrors'] << mirror + if mirrors.include?(mirror) + if mc.has_key?('components-include') and not mc['components-include'].include?(component) + conf['exclude-mirrors'] << mirror + end end end