+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 = {}
results['smarthost'] = ''
results['heavy_exim'] = ''
results['smarthost_port'] = 587
- results['reservedaddrs'] = '0.0.0.0/8 : 127.0.0.0/8 : 10.0.0.0/8 : 169.254.0.0/16 : 172.16.0.0/12 : 192.0.0.0/17 : 192.168.0.0/16 : 224.0.0.0/4 : 240.0.0.0/5 : 248.0.0.0/5'
-
+
if yaml['host_settings'].kind_of?(Hash)
yaml['host_settings'].each_pair do |property, values|
if values.kind_of?(Hash)
}
require 'yaml'
- $KCODE = 'utf-8'
+ yamlfile = Puppet::Parser::Files.find_file('debian_org/misc/local.yaml', compiler.environment)
yaml = YAML.load_file(yamlfile)
ret = {}