1PUPPET-AGENT(8)                  Puppet manual                 PUPPET-AGENT(8)
2
3
4

NAME

6       puppet-agent - The puppet agent daemon
7

SYNOPSIS

9       Retrieves  the  client configuration from the puppet master and applies
10       it to the local host.
11
12       This service may be run as a daemon, run periodically  using  cron  (or
13       something similar), or run interactively for testing purposes.
14

USAGE

16       puppet    agent   [--certname   NAME]   [-D|--daemonize|--no-daemonize]
17       [-d|--debug] [--detailed-exitcodes] [--digest DIGEST] [--disable  [MES‐
18       SAGE]]   [--enable]   [--fingerprint]  [-h|--help]  [-l|--logdest  sys‐
19       log|eventlog|ABS   FILEPATH|console]   [--masterport   PORT]   [--noop]
20       [-o|--onetime]  [--sourceaddress IP_ADDRESS] [-t|--test] [-v|--verbose]
21       [-V|--version] [-w|--waitforcert SECONDS]
22

DESCRIPTION

24       This is the main puppet client.  Its  job  is  to  retrieve  the  local
25       machine´s  configuration from a remote server and apply it. In order to
26       successfully communicate with the remote server, the client must have a
27       certificate  signed  by a certificate authority that the server trusts;
28       the recommended method for this, at the moment, is to run a certificate
29       authority  as  part  of  the  puppet server (which is the default). The
30       client will connect and request a signed certificate, and will continue
31       connecting until it receives one.
32
33       Once the client has a signed certificate, it will retrieve its configu‐
34       ration and apply it.
35

USAGE NOTES

37       ´puppet agent´ does its best to find a compromise  between  interactive
38       use and daemon use. Run with no arguments and no configuration, it will
39       go into the background,  attempt  to  get  a  signed  certificate,  and
40       retrieve and apply its configuration every 30 minutes.
41
42       Some flags are meant specifically for interactive use -- in particular,
43       ´test´, ´tags´ and ´fingerprint´ are useful.
44
45       ´--test´ does a single run in the foreground with verbose logging, then
46       exits. It will also exit if it can´t get a valid catalog. The exit code
47       after running with ´--test´  is  0  if  the  catalog  was  successfully
48       applied,  and  1  if  the run either failed or wasn´t attempted (due to
49       another run already in progress).
50
51       ´--tags´ allows you to specify what portions  of  a  configuration  you
52       want to apply. Puppet elements are tagged with all of the class or def‐
53       inition names that contain them, and you can use  the  ´tags´  flag  to
54       specify  one  of  these names, causing only configuration elements con‐
55       tained within that class or definition to be applied. This is very use‐
56       ful when you are testing new configurations -- for instance, if you are
57       just starting to manage ´ntpd´, you would put all of the  new  elements
58       into  an  ´ntpd´ class, and call puppet with ´--tags ntpd´, which would
59       only apply that small portion of the configuration during your testing,
60       rather than applying the whole thing.
61
62       ´--fingerprint´  is  a  one-time flag. In this mode ´puppet agent´ will
63       run once and display on the console (and in the log) the  current  cer‐
64       tificate (or certificate request) fingerprint. Providing the ´--digest´
65       option allows to use a different digest algorithm to generate the  fin‐
66       gerprint.  The  main use is to verify that before signing a certificate
67       request on the master, the certificate request the master  received  is
68       the same as the one the client sent (to prevent against man-in-the-mid‐
69       dle attacks when signing certificates).
70

OPTIONS

72       Note that any Puppet setting that´s valid in the configuration file  is
73       also  a  valid long argument. For example, ´server´ is a valid setting,
74       so you can specify ´--server servername´ as an argument.  Boolean  set‐
75       tings translate into ´--setting´ and ´--no-setting´ pairs.
76
77       See    the    configuration    file   documentation   at   https://pup
78       pet.com/docs/puppet/latest/configuration.html  for  the  full  list  of
79       acceptable  settings. A commented list of all settings can also be gen‐
80       erated by running puppet agent with ´--genconfig´.
81
82       --certname
83              Set the certname (unique ID) of the  client.  The  master  reads
84              this  unique  identifying  string,  which  is usually set to the
85              node´s fully-qualified domain name, to determine which  configu‐
86              rations  the  node  will receive. Use this option to debug setup
87              problems or implement unusual node identification schemes. (This
88              is a Puppet setting, and can go in puppet.conf.)
89
90       --daemonize
91              Send the process into the background. This is the default. (This
92              is a Puppet setting, and can go in puppet.conf. Note the special
93              ´no-´ prefix for boolean settings on the command line.)
94
95       --no-daemonize
96              Do  not  send the process into the background. (This is a Puppet
97              setting, and can go in puppet.conf. Note the special ´no-´  pre‐
98              fix for boolean settings on the command line.)
99
100       --debug
101              Enable full debugging.
102
103       --detailed-exitcodes
104              Provide  extra  information  about  the run via exit codes; only
105              works if ´--test´ or ´--onetime´ is also specified. If  enabled,
106              ´puppet agent´ will use the following exit codes:
107
108              0: The run succeeded with no changes or failures; the system was
109              already in the desired state.
110
111              1: The run failed,  or  wasn´t  attempted  due  to  another  run
112              already in progress.
113
114              2: The run succeeded, and some resources were changed.
115
116              4: The run succeeded, and some resources failed.
117
118              6: The run succeeded, and included both changes and failures.
119
120       --digest
121              Change  the  certificate  fingerprinting  digest  algorithm. The
122              default is SHA256.  Valid  values  depends  on  the  version  of
123              OpenSSL  installed,  but  will likely contain MD5, MD2, SHA1 and
124              SHA256.
125
126       --disable
127              Disable working on the local system. This puts a  lock  file  in
128              place,  causing  ´puppet  agent´ not to work on the system until
129              the lock file is removed. This is useful if you  are  testing  a
130              configuration and do not want the central configuration to over‐
131              ride the local state until everything is tested and committed.
132
133              Disable can also take an optional message that will be  reported
134              by the ´puppet agent´ at the next disabled run.
135
136              ´puppet  agent´  uses the same lock file while it is running, so
137              no more than one ´puppet agent´ process is working at a time.
138
139              ´puppet agent´ exits after executing this.
140
141       --enable
142              Enable working on the local system. This removes any lock  file,
143              causing  ´puppet agent´ to start managing the local system again
144              (although it will continue to use its normal scheduling,  so  it
145              might not start for another half hour).
146
147              ´puppet agent´ exits after executing this.
148
149       --fingerprint
150              Display  the  current certificate or certificate signing request
151              fingerprint and then exit. Use the ´--digest´ option  to  change
152              the digest algorithm used.
153
154       --help Print this help message
155
156       --job-id
157              Attach  the  specified  job  id  to  the catalog request and the
158              report used for this agent run.  This  option  only  works  when
159              ´--onetime´ is used.
160
161       --logdest
162              Where  to  send log messages. Choose between ´syslog´ (the POSIX
163              syslog service), ´eventlog´ (the Windows Event Log),  ´console´,
164              or the path to a log file. If debugging or verbosity is enabled,
165              this defaults to ´console´. Otherwise, it defaults  to  ´syslog´
166              on POSIX systems and ´eventlog´ on Windows.
167
168              A  path  ending  with  ´.json´ will receive structured output in
169              JSON format. The log file will not have an ending ´]´  automati‐
170              cally  written  to it due to the appending nature of logging. It
171              must be appended manually to make the content valid JSON.
172
173       --masterport
174              The port on which to contact the puppet master. (This is a  Pup‐
175              pet setting, and can go in puppet.conf.)
176
177       --noop Use  ´noop´  mode  where  the  daemon runs in a no-op or dry-run
178              mode. This is useful for seeing what changes  Puppet  will  make
179              without  actually  executing the changes. (This is a Puppet set‐
180              ting, and can go in puppet.conf. Note the special  ´no-´  prefix
181              for boolean settings on the command line.)
182
183       --onetime
184              Run  the configuration once. Runs a single (normally daemonized)
185              Puppet run. Useful for interactively running puppet  agent  when
186              used  in  conjunction with the --no-daemonize option. (This is a
187              Puppet setting, and can go  in  puppet.conf.  Note  the  special
188              ´no-´ prefix for boolean settings on the command line.)
189
190       --sourceaddress
191              Set  the  source  IP  address for transactions. This defaults to
192              automatically selected. (This is a Puppet setting, and can go in
193              puppet.conf.)
194
195       --test Enable the most common options used for testing. These are ´one‐
196              time´,   ´verbose´,   ´no-daemonize´,    ´no-usecacheonfailure´,
197              ´detailed-exitcodes´, ´no-splay´, and ´show_diff´.
198
199       --verbose
200              Turn on verbose reporting.
201
202       --version
203              Print the puppet version number and exit.
204
205       --waitforcert
206              This  option  only matters for daemons that do not yet have cer‐
207              tificates and it is enabled by default,  with  a  value  of  120
208              (seconds).  This  causes ´puppet agent´ to connect to the server
209              every 2 minutes and ask it to sign a certificate  request.  This
210              is useful for the initial setup of a puppet client. You can turn
211              off waiting for certificates by specifying a time of 0. (This is
212              a  Puppet  setting,  and can go in puppet.conf. Note the special
213              ´no-´ prefix for boolean settings on the command line.)
214

EXAMPLE

216       $ puppet agent --server puppet.domain.com
217

DIAGNOSTICS

219       Puppet agent accepts the following signals:
220
221       SIGHUP Restart the puppet agent daemon.
222
223       SIGINT and SIGTERM
224              Shut down the puppet agent daemon.
225
226       SIGUSR1
227              Immediately retrieve and apply configurations  from  the  puppet
228              master.
229
230       SIGUSR2
231              Close  file descriptors for log files and reopen them. Used with
232              logrotate.
233

AUTHOR

235       Luke Kanies
236
238       Copyright (c) 2011 Puppet Inc.,  LLC  Licensed  under  the  Apache  2.0
239       License
240
241
242
243Puppet, Inc.                     January 2019                  PUPPET-AGENT(8)
Impressum