lib/hieracles/node.rb in hieracles-0.3.4 vs lib/hieracles/node.rb in hieracles-0.3.5
- old
+ new
@@ -15,12 +15,13 @@
@config = config
@hiera = Hieracles::Hiera.new @config
@hiera_params = { fqdn: @fqdn }.
merge(get_hiera_params(@fqdn)).
merge(@config.extraparams)
- @facts = deep_sort(@hiera_params.
- merge(@config.scope).
- merge(puppet_facts))
+ @facts = deep_sort(@config.scope.
+ merge(puppet_facts).
+ merge(@hiera_params)
+ )
end
def get_hiera_params(fqdn)
@__hiera_params ||= if File.exist?(File.join(@config.encpath, "#{fqdn}.yaml"))
load = YAML.load_file(File.join(@config.encpath, "#{fqdn}.yaml"))