PUPPET-DEVICE(8)
okay bestie, we're doing the puppet-device(8) page from the Puppet manual and honestly? it's giving "quietly runs your entire remote device fleet" energy and nobody talks about it. sit down, grab a strawberry drink π, and let's go through it together, no cap.
β¨ NAME β¨
puppet-device β manage remote network devices π
π SYNOPSIS π
Retrieves catalogs from the Puppet master and applies them to remote
devices.
This subcommand can be run manually; or periodically using cron, a
scheduled task, or a similar tool.
fr fr, you can just run it by hand, or let cron (or a scheduled task, or literally any tool that does the same job) poke it on a timer. both are valid. main character energy either way π
π± USAGE π±
puppet device [-h|--help] [-v|--verbose] [-d|--debug] [-l|--logdest
syslog|file|console] [--detailed-exitcodes] [--deviceconfig file]
[-w|--waitforcert seconds] [--libdir directory] [-a|--apply file]
[-f|--facts] [-r|--resource type [name]] [-t|--target device]
[--user=user] [-V|--version]
that's the whole shape of it, bestie. every flag down there has a whole personality, we'll get to them πΈ
π DESCRIPTION π
here's the thing: devices can't just vibe on their own. they need a proxy Puppet agent to do the heavy lifting β that agent requests certificates, collects facts, retrieves and applies catalogs, and stores reports. the device just sits there looking cute while the agent does everything. iconic division of labor tbh π«Ά
π USAGE NOTES π
so, devices that get managed by the puppet-device subcommand on a Puppet agent? they're configured in device.conf, which lives at $confdir/device.conf by default, and you can change that with the $deviceconfig setting. slay.
the device.conf file is an INI-like file, with one section per device:
[DEVICE_CERTNAME] type TYPE url URL debug
the section name is literally the certname of the device. that's its whole identity. the values for the type and url properties are specific to each type of device β so don't go guessing, okay?
the optional debug property specifies transport-level debugging, and it's limited to telnet and ssh transports. that's it, those two, periodt.
for details, go read https://puppet.com/docs/puppet/latest/config_file_device.html β it's all there, iykyk.
π OPTIONS π
quick heads up before the list: any setting that's valid in the configuration file is also a valid long argument. for example, server is a valid configuration parameter, so you can totally specify --server servername as an argument. cute, right? β¨
--help,-hβ print this help message. the classic. the GOAT π--verbose,-vβ turn on verbose reporting. she talks more. we love that for her.--debug,-dβ enable full debugging. maximum yapping, all the details π--logdest,-lβ where to send log messages. choose betweensyslog(the POSIX syslog service),console, or the path to a log file. if debugging or verbosity is enabled, this defaults toconsole. otherwise, it defaults tosyslog. you can set multiple destinations using a comma separated list (eg:/path/file1,console,/path/file2). a path ending with.jsonwill receive structured output in JSON format. but β and this is the annoying part π β the log file will not have an ending]automatically written to it, because logging just keeps appending. you have to append it manually to make the content valid JSON. rude, but that's the deal.--detailed-exitcodesβ provide transaction information via exit codes. if this is enabled, an exit code of1means at least one device had a compile failure, an exit code of2means at least one device had resource changes, and an exit code of4means at least one device had resource failures. exit codes of3,5,6, or7mean that a bitwise combination of the preceding exit codes happened. yes bestie, it's a bitmask, do the math π--deviceconfigβ path to the device config file for puppet device. default:$confdir/device.conf--waitforcert,-wβ this one only matters for targets that don't have certificates yet, and it's enabled by default with a value of120(seconds). it makespuppet devicepoll the server every 2 minutes and ask it to sign a certificate request. super useful for the initial setup of a target. you can turn off waiting for certificates by specifying a time of0.--libdirβ override the per-device libdir with a local directory. specifying a libdir also disables pluginsync. useful for testing. a path ending with.jsonlwill receive structured output in JSON Lines format.--applyβ apply a manifest against a remote target. target must be specified. (not optional, bestie, she will not guess π)--factsβ displays the facts of a remote target. target must be specified.--resourceβ displays a resource state as Puppet code, roughly equivalent topuppet resource. can be filtered by title. requires--targetbe specified.--targetβ target a specific device/certificate in thedevice.conf. doing so will perform a device run against only that device/certificate. one device, one vibe, no distractions π--to_yamlβ output found resources inyamlformat, suitable to use with Hiera andcreate_resources.--userβ the user to run as.
πΈ EXAMPLE πΈ
$ puppet device --target remotehost --verbose
look at her go π¦
π¦ AUTHOR π¦
Brice Figureau β thank you for your service, king π
β COPYRIGHT β
Copyright (c) 2011-2018 Puppet Inc., LLC Licensed under the Apache 2.0 License
and that's the whole page, bestie π it's the puppet-device(8) manual from Puppet, Inc., dated September 2024, and you read the entire thing, which means you're officially smarter than everyone in the group chat. go apply a catalog to a remote device and be the main character you were born to be ππβ¨
π¦ where this page comes from
- arch rolling: puppet 8.10.0-6 Β· Apache-2.0
- fedora 43: puppet 8.10.0-2.fc43 Β· Apache-2.0
- fedora 43: puppet 8.10.0-3.fc43 Β· Apache-2.0
- fedora 44: puppet 8.10.0-4.fc44 Β· Apache-2.0
- fedora 44: puppet 8.10.0-5.fc44 Β· Apache-2.0
- nixos 26.05: puppet 8.10.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms