Sha256: 56429f017831b300e95dd84526490a02f7202e855153962f5391535cadf97024
Contents?: true
Size: 1.14 KB
Versions: 18
Compression:
Stored size: 1.14 KB
Contents
require 'puppet/indirector/terminus' class Puppet::Indirector::Corl < Puppet::Indirector::Terminus def initialize(*args) node = CORL::Provisioner::Puppetnode.node unless node.config_initialized? raise "CORL terminus not supported without the CORL library" end super end #--- def find(request) node = CORL::Provisioner::Puppetnode.node puppet_scope = request.options[:variables] module_name = nil module_name = puppet_scope.source.module_name if puppet_scope.source contexts = [ :param, :data_binding, request.key ] default_options = { :provisioner => :puppetnode, :hiera_scope => puppet_scope, :puppet_scope => puppet_scope, :search => 'core::default', :search_name => false, :force => true, :merge => true, :undefined_value => :undef } if module_name config = CORL::Config.init({}, contexts, module_name, default_options) else config = CORL::Config.init_flat({}, contexts, default_options) end node.lookup(request.key, nil, config) end end
Version data entries
18 entries across 18 versions & 1 rubygems