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

NAME

6       puppet-apply - Apply Puppet manifests locally
7

SYNOPSIS

9       Applies a standalone Puppet manifest to the local system.
10

USAGE

12       puppet  apply  [-h|--help]  [-V|--version]  [-d|--debug] [-v|--verbose]
13       [-e|--execute] [--detailed-exitcodes] [-L|--loadclasses]  [-l|--logdest
14       syslog|eventlog|ABS   FILEPATH|console]  [--noop]  [--catalog  catalog]
15       [--write-catalog-summary] file
16

DESCRIPTION

18       This is the standalone puppet execution tool; use it to apply  individ‐
19       ual manifests.
20
21       When  provided with a modulepath, via command line or config file, pup‐
22       pet apply can effectively mimic the catalog that  would  be  served  by
23       puppet  master with access to the same modules, although there are some
24       subtle differences. When combined with scheduling and an automated sys‐
25       tem  for  pushing manifests, this can be used to implement a serverless
26       Puppet site.
27
28       Most users should use ´puppet agent´ and ´puppet master´ for  site-wide
29       manifests.
30

OPTIONS

32       Any  setting that´s valid in the configuration file is a valid long ar‐
33       gument for puppet apply. For example, ´tags´ is a valid setting, so you
34       can specify ´--tags class,tag´ as an argument.
35
36       See    the    configuration    file   documentation   at   https://pup
37       pet.com/docs/puppet/latest/configuration.html for the full list of  ac‐
38       ceptable  parameters. You can generate a commented list of all configu‐
39       ration options by running puppet with ´--genconfig´.
40
41       •   --debug: Enable full debugging.
42
43       •   --detailed-exitcodes: Provide extra information about the  run  via
44           exit  codes. If enabled, ´puppet apply´ will use the following exit
45           codes:
46
47           0: The run succeeded with no changes or failures;  the  system  was
48           already in the desired state.
49
50           1: The run failed.
51
52           2: The run succeeded, and some resources were changed.
53
54           4: The run succeeded, and some resources failed.
55
56           6: The run succeeded, and included both changes and failures.
57
58       •   --help: Print this help message
59
60       •   --loadclasses:  Load any stored classes. ´puppet agent´ caches con‐
61           figured classes (usually at /etc/puppet/classes.txt),  and  setting
62           this  option  causes  all of those classes to be set in your puppet
63           manifest.
64
65       •   --logdest: Where to send log messages. Choose between ´syslog´ (the
66           POSIX  syslog  service),  ´eventlog´ (the Windows Event Log), ´con‐
67           sole´, or the path to a log file. Defaults to  ´console´.  Multiple
68           destinations   can  be  set  using  a  comma  separated  list  (eg:
69           /path/file1,console,/path/file2)"
70
71           A path ending with ´.json´ will receive structured output  in  JSON
72           format.  The  log  file  will  not have an ending ´]´ automatically
73           written to it due to the appending nature of logging.  It  must  be
74           appended manually to make the content valid JSON.
75
76           A  path ending with ´.jsonl´ will receive structured output in JSON
77           Lines format.
78
79       •   --noop: Use ´noop´ mode where Puppet runs in  a  no-op  or  dry-run
80           mode. This is useful for seeing what changes Puppet will make with‐
81           out actually executing the changes.
82
83       •   --execute: Execute a specific piece of Puppet code
84
85       •   --test: Enable the most common options used for testing. These  are
86           ´verbose´, ´detailed-exitcodes´ and ´show_diff´.
87
88       •   --verbose: Print extra information.
89
90       •   --catalog: Apply a JSON catalog (such as one generated with ´puppet
91           master --compile´). You can either specify a JSON file or  pipe  in
92           JSON from standard input.
93
94       •   --write-catalog-summary  After  compiling the catalog saves the re‐
95           source list and classes list to the node  in  the  state  directory
96           named classes.txt and resources.txt
97
98
99

EXAMPLE

101       $ puppet apply -l /tmp/manifest.log manifest.pp
102       $ puppet apply --modulepath=/root/dev/modules -e "include ntpd::server"
103       $ puppet apply --catalog catalog.json
104

AUTHOR

106       Luke Kanies
107
109       Copyright  (c)  2011 Puppet Inc., LLC Licensed under the Apache 2.0 Li‐
110       cense
111
112
113
114Puppet, Inc.                     October 2023                  PUPPET-APPLY(8)
Impressum