From a4a8b02272663a54f9abba77a4c9756287a0c7de Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 12 Feb 2017 17:36:50 +0100 Subject: [PATCH] support limit-mirrors in has_static_component --- .../puppet/parser/functions/has_static_component.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/puppetmaster/lib/puppet/parser/functions/has_static_component.rb b/modules/puppetmaster/lib/puppet/parser/functions/has_static_component.rb index cd04cdc11..ded96ceee 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/has_static_component.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/has_static_component.rb @@ -19,12 +19,10 @@ module Puppet::Parser::Functions if cfg.include?('components') if cfg['components'].include?(static_component) - if cfg['components'][static_component].include?('exclude-mirrors') - if cfg['components'][static_component]['exclude-mirrors'].include?(fqdn) - return false - else - return true - end + if cfg['components'][static_component].include?('limit-mirrors') + return (cfg['components'][static_component]['limit-mirrors'].include?(fqdn)) + elsif cfg['components'][static_component].include?('exclude-mirrors') + return (not cfg['components'][static_component]['exclude-mirrors'].include?(fqdn)) else return true end -- 2.20.1