]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb
Revert "Change hoster.yaml to allow for more keys in the future"
[dsa-puppet.git] / modules / puppetmaster / lib / puppet / parser / functions / whohosts.rb
index 2835cef2d3f8d8ea0b62a4bd679c279db90a32e5..c2bda8c4aa05db1fdf7052d5ef4dbb0e427515cd 100644 (file)
@@ -15,11 +15,9 @@ module Puppet::Parser::Functions
     if (nodeinfo['ldap'].has_key?('ipHostNumber'))
       nodeinfo['ldap']['ipHostNumber'].each do |addr|
         yaml.keys.each do |hoster|
-          if yaml[hoster].has_key?'netrange'
-            yaml[hoster]['netrange'].each do |net|
-              if IPAddr.new(net).include?(addr)
-                return hoster
-              end
+          yaml[hoster].each do |net|
+            if IPAddr.new(net).include?(addr)
+              ans = hoster
             end
           end
         end
@@ -28,6 +26,3 @@ module Puppet::Parser::Functions
     return ans
   end
 end
-# vim:set ts=2:
-# vim:set et:
-# vim:set shiftwidth=2: