Sha256: e86c817d3257db40aa3b2625195d5b72ab59bd72806e1da2a9b9b7f13ce9cf47
Contents?: true
Size: 806 Bytes
Versions: 32
Compression:
Stored size: 806 Bytes
Contents
# frozen_string_literal: true require_relative '../../../puppet/node' require_relative '../../../puppet/indirector/plain' class Puppet::Node::Plain < Puppet::Indirector::Plain desc "Always return an empty node object. Assumes you keep track of nodes in flat file manifests. You should use it when you don't have some other, functional source you want to use, as the compiler will not work without a valid node terminus. Note that class is responsible for merging the node's facts into the node instance before it is returned." # Just return an empty node. def find(request) node = super node.environment = request.environment facts = request.options[:facts].is_a?(Puppet::Node::Facts) ? request.options[:facts] : nil node.fact_merge(facts) node end end
Version data entries
32 entries across 32 versions & 1 rubygems