lib/hieracles/node.rb in hieracles-0.1.2 vs lib/hieracles/node.rb in hieracles-0.1.3

- old
+ new

@@ -11,10 +11,11 @@ def initialize(fqdn, options) Config.load(options) @hiera = Hieracles::Hiera.new @hiera_params = { fqdn: fqdn }. merge(get_hiera_params(fqdn)). + merge(Config.scope). merge(Config.extraparams) @fqdn = fqdn end def get_hiera_params(fqdn) @@ -49,10 +50,11 @@ data = YAML.load_file(File.join(Config.basepath, f)) if data s = to_shallow_hash(data) s.each do |k,v| params[k] ||= [] + # f needs interpolation params[k] << { value: v, file: f} end end end params.sort @@ -60,10 +62,13 @@ def params_tree(without_common = true) params = {} paths(without_common).each do |f| data = YAML.load_file(f) - deep_merge!(params, data) if data + if data + # data needs interpolation + deep_merge!(params, data) + end end deep_sort(params) end def modules