X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fwhohosts.rb;fp=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fwhohosts.rb;h=3192bb731c82c2f9890e0981d4b686067c41c2a8;hb=1564a50936c74b7621173985fb6bb6d34c697989;hp=43592854ca1e2f47de66f6ca5394427800ba5ec2;hpb=09ea76ffc739a5cffd4651da89fb5f4c4c2b81ad;p=mirror%2Fdsa-puppet.git diff --git a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb index 43592854c..3192bb731 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb @@ -1,12 +1,14 @@ +require 'puppet/file_system' + module Puppet::Parser::Functions newfunction(:whohosts, :type => :rvalue) do |args| require 'ipaddr' require 'yaml' ipAddrs = args[0] - yamlfile = args[1] ans = {"name" => "unknown"} + yamlfile = Puppet::Parser::Files.find_file('debian_org/misc/hoster.yaml', compiler.environment) yaml = YAML.load_file(yamlfile) ipAddrs.each do |addr|