PUPPET-AGENT(8)
π PUPPET-AGENT π
okay bestie, welcome to puppet-agent β the manual page for the puppet agent daemon. yes it's a whole thing, yes it's iconic, let's go. π
β¨ NAME β¨
puppet-agent β the puppet agent daemon π
πΈ SYNOPSIS πΈ
It grabs your client config from the Puppet master and slaps it onto the local host. literally its whole job.
This service can be run as a daemon, run periodically using cron (or something similar), or run interactively for testing purposes. three vibes, pick your fighter. π
π¦ USAGE π¦
here's the whole shape of it, no cap:
puppet agent [--certname NAME] [-D|--daemonize|--no-daemonize]
[-d|--debug] [--detailed-exitcodes] [--digest DIGEST] [--disable
[MESSAGE]] [--enable] [--fingerprint] [-h|--help] [-l|--logdest
syslog|eventlog|ABS FILEPATH|console] [--serverport PORT] [--noop]
[-o|--onetime] [--sourceaddress IP_ADDRESS] [-t|--test] [-v|--verbose]
[-V|--version] [-w|--waitforcert SECONDS]
π DESCRIPTION π
This is the main puppet client. Its job? Retrieve the local machine's configuration from a remote server and apply it. that's the mission, that's the assignment, that's the main character energy. β¨
So here's the tea π β in order to successfully communicate with the remote server, the client must have a certificate signed by a certificate authority that the server trusts. The recommended method for this, at the moment, is to run a certificate authority as part of the puppet server (which is the default, iykyk). The client will connect and request a signed certificate, and it will keep connecting until it receives one. it's giving devoted. it's giving "not leaving until you text back". π
Once the client has a signed certificate, it will retrieve its configuration and apply it. periodt. π
π USAGE NOTES π
puppet agent does its best to find a compromise between interactive use and daemon use. like, it's a people pleaser, we love that for it. π«Ά
If you run it with no arguments and no configuration, it goes into the background, attempts to get a signed certificate, and retrieves and applies its configuration every 30 minutes. set it and forget it, bestie. β
Some flags are meant specifically for interactive use β in particular, test, tags and fingerprint are useful. those are your little testing besties. π
--test runs once in the foreground with verbose logging, then exits. It also exits if it can't get a valid catalog. --test includes the --detailed-exitcodes option by default and exits with one of the following exit codes:
- 0: The run succeeded with no changes or failures; the system was already in the desired state. β¨ (already perfect, nothing to do)
- 1: The run failed, or wasn't attempted due to another run already in progress. π
- 2: The run succeeded, and some resources were changed. π₯
- 4: The run succeeded, and some resources failed. π
- 6: The run succeeded, and included both changes and failures. π
--tags allows you to specify what portions of a configuration you want to apply. Puppet elements are tagged with all of the class or definition names that contain them, and you can use the tags flag to specify one of these names, causing only configuration elements contained within that class or definition to be applied. This is very useful when you are testing new configurations β for instance, if you are just starting to manage ntpd, you would put all of the new elements into an ntpd class, and call puppet with --tags ntpd, which would only apply that small portion of the configuration during your testing, rather than applying the whole thing. like, test a lil bite before you eat the whole cake. π
--fingerprint is a one-time flag. In this mode puppet agent runs once and displays on the console (and in the log) the current certificate (or certificate request) fingerprint. Providing the --digest option allows you to use a different digest algorithm to generate the fingerprint. The main use is to verify that before signing a certificate request on the master, the certificate request the master received is the same as the one the client sent β to prevent against man-in-the-middle attacks when signing certificates. so basically, check the ID before you let anyone in the club. π
--skip_tags is a flag used to filter resources. If this is set, then only resources not tagged with the specified tags will be applied. Values must be comma-separated. yes, comma-separated, do not fight the comma. πΈ
okay that's part 1 bestie, keep reading, we're not done yet π
β¨ OPTIONS β¨
okay bestie, first things first π any Puppet setting that's valid in the configuration file is ALSO a valid long argument. like, server is a valid setting, so you can absolutely just say --server servername and it works. and booleans?? they get the special --no- prefix treatment to flip them off, so --setting and --no-setting are a little matched pair β think --daemonize and --no-daemonize π«Ά
want the full list of acceptable settings? it lives in the config file docs at https://puppet.com/docs/puppet/latest/configuration.html π and you can also get a commented list of ALL of them by running puppet agent with --genconfig. so helpful of it honestly.
--certnameβ sets the certname (the unique ID) of the client. the master reads this unique identifying string β usually the node's fully-qualified domain name β to figure out which configurations the node is gonna receive. use it to debug setup problems or to implement β¨unusualβ¨ node identification schemes. (This is a Puppet setting, and can go inpuppet.conf.)--daemonizeβ sends the process into the background. this is the default, bestie. (This is a Puppet setting, and can go inpuppet.conf. Note the specialno-prefix for boolean settings on the command line.)--no-daemonizeβ does NOT send the process into the background. (This is a Puppet setting, and can go inpuppet.conf. Note the specialno-prefix for boolean settings on the command line.)--debugβ enable full debugging. we love full debugging π--detailed-exitcodesβ gives you extra info about the run via exit codes; only works if--testor--onetimeis also specified. if enabled,puppet agentuses these exit codes:
0: the run succeeded with no changes or failures; the system was already in the desired state. β
1: the run failed, or wasn't attempted due to another run already in progress. π
2: the run succeeded, and some resources were changed. β¨
4: the run succeeded, and some resources failed. π
6: the run succeeded, and included both changes and failures. π
--digestβ change the certificate fingerprinting digest algorithm. the default isSHA256. valid values depend on the version of OpenSSL you've got installed, but they'll likely containMD5,MD2,SHA1andSHA256.--disableβ disables working on the local system. this puts a lock file in place, causingpuppet agentto not work on the system until that lock file is removed. super useful if you're testing a configuration and you don't want the central config overriding your local state before everything is tested and committed π
disable can also take an optional message that puppet agent will report at the next disabled run.
puppet agent uses the same lock file while it is running, so no more than one puppet agent process is working at a time. one at a time, no chaos, we stay organized π
puppet agent exits after executing this.
--enableβ enables working on the local system. this removes any lock file, causingpuppet agentto start managing the local system again. HOWEVER β it continues to use its normal scheduling, so it might not start for another half hour β° (patience, bestie)
puppet agent exits after executing this.
--evaltraceβ logs each resource as it's being evaluated. this lets you interactively see exactly what is being done. (This is a Puppet setting, and can go inpuppet.conf. Note the specialno-prefix for boolean settings on the command line.)--fingerprintβ displays the current certificate or certificate signing request fingerprint, then exits. use the--digestoption to change which digest algorithm gets used.--helpβ print this help message π«Ά--job-idβ attaches the specified job id to the catalog request and the report used for this agent run. this option only works when--onetimeis used. and if you're on Puppet Enterprise, do NOT use this flag β the orchestrator sets the job-id for you and it must be unique. so like, hands off that one π₯--logdestβ where to send log messages. choose betweensyslog(the POSIX syslog service),eventlog(the Windows Event Log),console, or the path to a log file. if debugging or verbosity is enabled, this defaults toconsole. otherwise it defaults tosyslogon POSIX systems andeventlogon Windows. you can set multiple destinations with a comma separated list (eg:/path/file1,console,/path/file2)
a path ending with .json will receive structured output in JSON format. the log file will not have an ending ] automatically written to it, due to the appending nature of logging β it must be appended manually to make the content valid JSON. don't forget, or it's not valid, fr fr.
a path ending with .jsonl will receive structured output in JSON Lines format.
--masterportβ the port on which to contact the Puppet Server. (This is a Puppet setting, and can go inpuppet.conf. Deprecated in favor of theserverportsetting.) so like, it still exists but it's giving legacy energy--noopβ usenoopmode where the daemon runs in a no-op / dry-run mode. this is perfect for seeing what changes Puppet WOULD make without actually executing them. window shopping for config changes, we love to see it ποΈ (This is a Puppet setting, and can go inpuppet.conf. Note the specialno-prefix for boolean settings on the command line.)--onetimeβ run the configuration once. runs a single (normally daemonized) Puppet run. useful for interactively runningpuppet agentwhen used in conjunction with the--no-daemonizeoption. (This is a Puppet setting, and can go inpuppet.conf. Note the specialno-prefix for boolean settings on the command line.)--serverportβ the port on which to contact the Puppet Server. (This is a Puppet setting, and can go inpuppet.conf.)--sourceaddressβ set the source IP address for transactions. this defaults to automatically selected. (This is a Puppet setting, and can go inpuppet.conf.)--testβ enable the most common options used for testing. those areonetime,verbose,no-daemonize,no-usecacheonfailure,detailed-exitcodes,no-splay, andshow_diff. a whole little bundle, iconic π--traceβ prints stack traces on some errors. (This is a Puppet setting, and can go inpuppet.conf. Note the specialno-prefix for boolean settings on the command line.)--verboseβ turn on verbose reporting. give me ALL the details π--versionβ print the puppet version number and exit.--waitforcertβ this option only matters for daemons that don't yet have certificates, and it's enabled by default, with a value of120(seconds). this causespuppet agentto connect to the server every 2 minutes and ask it to sign a certificate request. super useful for the initial setup of a puppet client. you can turn off waiting for certificates by specifying a time of0. (This is a Puppet setting, and can go inpuppet.conf.)--write_catalog_summaryβ after compiling the catalog, saves the resource list and classes list to the node in the state directory, namedclasses.txtandresources.txt. (This is a Puppet setting, and can go inpuppet.conf.)
π EXAMPLE π
look at her go:
$ puppet agent --server puppet.domain.com
π¦ DIAGNOSTICS π¦
Puppet agent accepts the following signals (yes she speaks signal, multilingual queen):
SIGHUPβ restart thepuppet agentdaemon.SIGINTandSIGTERMβ shut down thepuppet agentdaemon.SIGUSR1β immediately retrieve and apply configurations from the puppet master.SIGUSR2β close file descriptors for log files and reopen them. used withlogrotate.
π AUTHOR π
Luke Kanies
π COPYRIGHT π
Copyright (c) 2011 Puppet Inc., LLC Licensed under the Apache 2.0 License
okay that's the whole page bestie, you made it π this lil masterpiece came from Puppet, Inc., dated September 2024, and it's filed under PUPPET-AGENT(8) β go forth and configure, you absolute main character π«Άβ¨
π¦ 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