1
require 'puppet/indirector/face'
2
Puppet::Indirector::Face.define(:node, '0.0.1') do
3
copyright "Puppet Labs", 2011
4
license "Apache 2 license; see COPYING"
6
summary "View and manage node definitions."
8
This subcommand interacts with node objects, which are used by Puppet to
9
build a catalog. A node object consists of the node's facts, environment,
10
node parameters (exposed in the parser as top-scope variables), and classes.
13
get_action(:destroy).summary "Invalid for this subcommand."
14
get_action(:search).summary "Invalid for this subcommand."
15
get_action(:save).summary "Invalid for this subcommand."
16
get_action(:save).description "Invalid for this subcommand."
18
find = get_action(:find)
19
find.summary "Retrieve a node object."
20
find.arguments "<host>"
22
A hash containing the node's `classes`, `environment`, `expiration`, `name`,
23
`parameters` (its facts, combined with any ENC-set parameters), and `time`.
24
When used from the Ruby API: a Puppet::Node object.
26
RENDERING ISSUES: Rendering as string and json are currently broken;
27
node objects can only be rendered as yaml.
29
find.examples <<-'EOT'
30
Retrieve an "empty" (no classes, no ENC-imposed parameters, and an
31
environment of "production") node:
33
$ puppet node find somenode.puppetlabs.lan --terminus plain --render-as yaml
35
Retrieve a node using the puppet master's configured ENC:
37
$ puppet node find somenode.puppetlabs.lan --terminus exec --mode master --render-as yaml
39
Retrieve the same node from the puppet master:
41
$ puppet node find somenode.puppetlabs.lan --terminus rest --render-as yaml