summaryrefslogtreecommitdiffstats
path: root/lib/puppet/indirector/node/null.rb
blob: f7c4d25ea5b0a2b3f172f8c70bfc4935a0e8a5f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'puppet/node'
require 'puppet/indirector/null'

class Puppet::Node::Null < Puppet::Indirector::Null
    desc "Always return an empty node object.  This is the node source you should
        use 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(name)
        node = super
        node.fact_merge
        node
    end
end