PUPPET-NODE(8)

πŸ’– PUPPET-NODE(8) πŸ’–

okay bestie, sit down, we're doing puppet-node β€” it's section 8 of the Puppet manual, aka the system-admin-y corner of the docs. this one's all about viewing and managing node definitions. no cap, it's lowkey iconic.


✨ NAME ✨

puppet-node β€” View and manage node definitions.


🌸 SYNOPSIS 🌸

puppet node action [--terminus _TERMINUS]

πŸ¦‹ DESCRIPTION πŸ¦‹

so this subcommand is the one that talks to node objects, which are literally the little blueprints Puppet uses to build a catalog. and a node object isn't just one thing, bestie, it's a whole bundle:

  • the node's facts
  • its environment
  • its node parameters (which get exposed in the parser as top-scope variables, iykyk)
  • and its classes

that's the whole vibe. four things. slay.


πŸ’… OPTIONS πŸ’…

first things first: any setting that's valid in the configuration file is also a valid long argument. doesn't mean it'll do anything useful for the action you're running, but it's valid. for example, server and run_mode are valid settings, so you can pass --server <servername> or --run_mode <runmode> as an argument. periodt.

for the full list of acceptable parameters, go read the configuration file docs at https://puppet.com/docs/puppet/latest/configuration.html. and if you want a commented list of all the configuration options, just run puppet with --genconfig and it'll hand you the whole menu. πŸŽ€

  • --render-as FORMAT β€” the format you want your output rendered in. the most common ones are json, s (that's string, bestie), yaml, and console, but sometimes other options like dot are available too. mix and match, it's giving ✨customization✨.
  • --verbose β€” whether to log verbosely. yes that's the whole description. yes I'm obsessed with how blunt it is.
  • --debug β€” whether to log debug information. the even chattier sibling of --verbose. πŸ›
  • --terminus _TERMINUS β€” okay so this one needs a whole explanation, buckle up 🫢

Indirector faces expose indirected subsystems of Puppet. these subsystems can each retrieve and alter one specific type of data (with the classic actions find, search, save, and destroy) from any number of pluggable backends. in Puppet parlance, those backends are called terminuses.

almost every indirected subsystem has a rest terminus that talks to the puppet master's data. most of them also have extra terminuses for various local data models, which in turn get used by the indirected subsystem on the puppet master whenever it receives a remote request. πŸ’€ it's a whole ecosystem.

the terminus for an action is usually figured out from context, but sometimes you gotta set it explicitly. check the "Notes" section of this face's manpage for the deets.


πŸ”₯ ACTIONS πŸ”₯

clean β€” Clean up signed certs, cached facts, node objects, and reports for a node stored by the puppetmaster

SYNOPSIS

puppet node clean [--terminus _TERMINUS] host1 [host2 ...]

DESCRIPTION

cleans up the following info that a puppet master knows about a node. it's a whole glow-up, we're clearing out:

  • Signed certificates β€” $vardir/ssl/ca/signed/node.domain.pem
  • Cached facts β€” $vardir/yaml/facts/node.domain.yaml
  • Cached node objects β€” $vardir/yaml/node/node.domain.yaml
  • Reports β€” $vardir/reports/node.domain
NOTE: this action now cleans up certs via Puppet Server's CA API. a running server is required for certs to be cleaned. no server, no cert cleanup, sorry bestie 😭

find β€” Retrieve a node object.

SYNOPSIS

puppet node find [--terminus _TERMINUS] host

DESCRIPTION

Retrieve a node object.

RETURNS

a hash containing the node's classes, environment, expiration, name, parameters (that's its facts combined with any ENC-set parameters), and time. when you're using it from the Ruby API, you get a Puppet::Node object. cute!

RENDERING ISSUES: rendering as string and json are currently broken β€” node objects can only be rendered as yaml. that's it, that's the rule. πŸ’€

info β€” Print the default terminus class for this face.

SYNOPSIS

puppet node info [--terminus _TERMINUS]

DESCRIPTION

prints the default terminus class for this subcommand. heads up: different run modes may have different default termini, so when in doubt, specify the run mode with the --run_mode option. she's flexible like that 🌈


🌟 EXAMPLES 🌟

find

retrieve an "empty" node (no classes, no ENC-imposed parameters, and an environment of production):

$ puppet node find somenode.puppetlabs.lan --terminus plain --render-as yaml

retrieve a node using the Puppet Server's configured ENC:

$ puppet node find somenode.puppetlabs.lan --terminus exec --run_mode server --render-as yaml

retrieve the same node from the Puppet Server:

$ puppet node find somenode.puppetlabs.lan --terminus rest --render-as yaml

πŸ‘‘ NOTES πŸ‘‘

this subcommand is an indirector face, which exposes the find, search, save, and destroy actions for an indirected subsystem of Puppet. the valid termini for this face are, in no particular order but all iconic:

  • exec
  • json
  • memory
  • msgpack
  • plain
  • rest
  • store_configs
  • yaml

Copyright 2011 by Puppet Inc. Apache 2 license; see COPYING


okay and that's the whole page, bestie!! πŸŽ€ this little love letter was brought to you by Puppet, Inc., dated September 2024, and it lives at PUPPET-NODE(8) in the manual. go forth and manage your nodes, you absolute main character πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from