X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fwhohosts.rb;h=ed2a0c0436aac40151f28c7d8f8cc538017bd825;hb=7af611e0182886baa11ae172e741d5e8eb2d2ce4;hp=20f83d367851f75ad07ad9ba6f957eaaff82038b;hpb=3b9bedfb9c7e5cd42e2d198b8dbd7a8649a3608d;p=dsa-puppet.git diff --git a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb index 20f83d36..ed2a0c04 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb @@ -14,11 +14,8 @@ module Puppet::Parser::Functions ipAddrs.each do |addr| yaml.keys.each do |hoster| - if yaml[hoster].kind_of?(Hash) and yaml[hoster].has_key?('netrange') - netrange = yaml[hoster]['netrange'] - else - next - end + next unless yaml[hoster].kind_of?(Hash) and yaml[hoster].has_key?('netrange') + netrange = yaml[hoster]['netrange'] netrange.each do |net| begin