Remove smarthost_port from nodeinfo
[mirror/dsa-puppet.git] / modules / puppetmaster / lib / puppet / parser / functions / yamlinfo.rb
index f53014d..5839b75 100644 (file)
@@ -1,10 +1,9 @@
+require 'puppet/file_system'
+
 module Puppet::Parser::Functions
   newfunction(:yamlinfo, :type => :rvalue) do |args|
 
     host = args[0]
-    yamlfile = args[1]
-    parser = Puppet::Parser::Parser.new(environment)
-    parser.watch_file(yamlfile)
 
     read_yaml = lambda { |yaml, host|
       results = {}
@@ -27,7 +26,6 @@ module Puppet::Parser::Functions
       results['mail_port']      = ''
       results['smarthost']      = ''
       results['heavy_exim']     = ''
-      results['smarthost_port'] = 587
 
       if yaml['host_settings'].kind_of?(Hash)
         yaml['host_settings'].each_pair do |property, values|
@@ -43,6 +41,7 @@ module Puppet::Parser::Functions
 
     require 'yaml'
 
+    yamlfile = Puppet::Parser::Files.find_file('debian_org/misc/local.yaml', compiler.environment)
     yaml = YAML.load_file(yamlfile)
     ret = {}