summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/configuration.rb4
-rw-r--r--lib/puppet/node_source/none.rb10
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/puppet/configuration.rb b/lib/puppet/configuration.rb
index 574038338..a8f6e0c35 100644
--- a/lib/puppet/configuration.rb
+++ b/lib/puppet/configuration.rb
@@ -549,7 +549,9 @@ module Puppet
setdefaults(:parser,
:typecheck => [true, "Whether to validate types during parsing."],
:paramcheck => [true, "Whether to validate parameters during parsing."],
- :node_source => ["", "Where to look for node configuration information.
+ :node_source => ["none", "Where to look for node configuration information.
+ The default node source, ``none``, just returns a node with its facts
+ filled in, which is required for normal functionality.
See the `NodeSourceReference`:trac: for more information."]
)
diff --git a/lib/puppet/node_source/none.rb b/lib/puppet/node_source/none.rb
new file mode 100644
index 000000000..ce188add5
--- /dev/null
+++ b/lib/puppet/node_source/none.rb
@@ -0,0 +1,10 @@
+Puppet::Network::Handler::Node.newnode_source(:none, :fact_merge => true) do
+ 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 this node information."
+
+ # Just return an empty node.
+ def nodesearch(name)
+ newnode(name)
+ end
+end