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

NAME

6       puppet-catalog - Compile, save, view, and convert catalogs.
7

SYNOPSIS

9       puppet catalog action [--terminus _TERMINUS] [--extra HASH]
10

DESCRIPTION

12       This  subcommand deals with catalogs, which are compiled per-node arti‐
13       facts generated from a set of Puppet manifests. By default,  it  inter‐
14       acts  with  the  compiling  subsystem  and compiles a catalog using the
15       default manifest and certname, but you can change  the  source  of  the
16       catalog  with  the  --terminus option. You can also choose to print any
17       catalog in ´dot´ format (for easy graph  viewing  with  OmniGraffle  or
18       Graphviz) with ´--render-as dot´.
19

OPTIONS

21       Note  that any setting that´s valid in the configuration file is also a
22       valid long argument, although it may or may  not  be  relevant  to  the
23       present action. For example, server and run_mode are valid settings, so
24       you can specify --server <servername>, or --run_mode  <runmode>  as  an
25       argument.
26
27       See    the    configuration    file   documentation   at   https://pup
28       pet.com/docs/puppet/latest/configuration.html  for  the  full  list  of
29       acceptable  parameters.  A  commented list of all configuration options
30       can also be generated by running puppet with --genconfig.
31
32       --render-as FORMAT
33              The format in which to render output. The  most  common  formats
34              are  json, s (string), yaml, and console, but other options such
35              as dot are sometimes available.
36
37       --verbose
38              Whether to log verbosely.
39
40       --debug
41              Whether to log debug information.
42
43       --extra HASH
44              A terminus can take additional arguments to  refine  the  opera‐
45              tion,  which  are  passed  as an arbitrary hash to the back-end.
46              Anything passed as the extra value is just send  direct  to  the
47              back-end.
48
49       --terminus _TERMINUS
50              Indirector  faces  expose indirected subsystems of Puppet. These
51              subsystems are each able to retrieve and alter a  specific  type
52              of  data  (with  the familiar actions of find, search, save, and
53              destroy) from an arbitrary number of pluggable backends. In Pup‐
54              pet parlance, these backends are called terminuses.
55
56              Almost  all  indirected  subsystems  have  a  rest terminus that
57              interacts with the puppet master´s data. Most of them have addi‐
58              tional  terminuses  for  various local data models, which are in
59              turn used by the indirected subsystem on the puppet master when‐
60              ever it receives a remote request.
61
62              The  terminus  for an action is often determined by context, but
63              occasionally needs to be set explicitly. See the "Notes" section
64              of this face´s manpage for more details.
65

ACTIONS

67       apply - Find and apply a catalog.
68              SYNOPSIS
69
70              puppet catalog apply [--terminus _TERMINUS] [--extra HASH]
71
72              DESCRIPTION
73
74              Finds and applies a catalog. This action takes no arguments, but
75              the source of the catalog can be  managed  with  the  --terminus
76              option.
77
78              RETURNS
79
80              Nothing. When used from the Ruby API, returns a Puppet::Transac‐
81              tion::Report object.
82
83       download - Download this node´s catalog from the puppet master server.
84              SYNOPSIS
85
86              puppet catalog download [--terminus _TERMINUS] [--extra HASH]
87
88              DESCRIPTION
89
90              Retrieves a catalog from the puppet master and saves it  to  the
91              local  yaml cache. This action always contacts the puppet master
92              and will ignore alternate termini.
93
94              The saved catalog can be used in any subsequent  catalog  action
95              by specifying ´--terminus yaml´ for that action.
96
97              RETURNS
98
99              Nothing.
100
101              NOTES
102
103              When  used  from  the Ruby API, this action has a side effect of
104              leaving Puppet::Resource::Catalog.indirection.terminus_class set
105              to  yaml.  The terminus must be explicitly re-set for subsequent
106              catalog actions.
107
108       find - Retrieve the catalog for a node.
109              SYNOPSIS
110
111              puppet catalog find [--terminus _TERMINUS] [--extra HASH]  cert‐
112              name
113
114              DESCRIPTION
115
116              Retrieve the catalog for a node.
117
118              RETURNS
119
120              A  serialized  catalog.  When  used from the Ruby API, returns a
121              Puppet::Resource::Catalog object.
122
123       info - Print the default terminus class for this face.
124              SYNOPSIS
125
126              puppet catalog info [--terminus _TERMINUS] [--extra HASH]
127
128              DESCRIPTION
129
130              Prints the default terminus class for this subcommand. Note that
131              different  run modes may have different default termini; when in
132              doubt, specify the run mode with the ´--run_mode´ option.
133
134       save - API only: create or overwrite an object.
135              SYNOPSIS
136
137              puppet catalog save [--terminus _TERMINUS] [--extra HASH] key
138
139              DESCRIPTION
140
141              API only: create or overwrite an object. As the Faces  framework
142              does  not  currently accept data from STDIN, save actions cannot
143              currently be invoked from the command line.
144
145       select - Retrieve a catalog and filter it  for  resources  of  a  given
146       type.
147              SYNOPSIS
148
149              puppet catalog select [--terminus _TERMINUS] [--extra HASH] host
150              resource_type
151
152              DESCRIPTION
153
154              Retrieves a catalog for the specified host, then searches it for
155              all resources of the requested type.
156
157              RETURNS
158
159              A  list  of  resource references ("Type[title]"). When used from
160              the API, returns an array of  Puppet::Resource  objects  excised
161              from a catalog.
162
163              NOTES
164
165              By  default,  this  action will retrieve a catalog from Puppet´s
166              compiler subsystem; you must call  the  action  with  --terminus
167              rest if you wish to retrieve a catalog from the puppet master.
168
169              FORMATTING  ISSUES:  This  action cannot currently render useful
170              yaml; instead, it returns an entire catalog. Use json instead.
171

EXAMPLES

173       apply
174
175       Apply the locally cached catalog:
176
177       $ puppet catalog apply --terminus yaml
178
179       Retrieve a catalog from the master and apply it, in one step:
180
181       $ puppet catalog apply --terminus rest
182
183       API example:
184
185
186
187           # ...
188           Puppet::Face[:catalog, ´0.0.1´].download
189           # (Termini are singletons; catalog.download has a side effect of
190           # setting the catalog terminus to yaml)
191           report  = Puppet::Face[:catalog, ´0.0.1´].apply
192           # ...
193
194
195
196       download
197
198       Retrieve and store a catalog:
199
200       $ puppet catalog download
201
202       API example:
203
204
205
206           Puppet::Face[:plugin, ´0.0.1´].download
207           Puppet::Face[:facts, ´0.0.1´].upload
208           Puppet::Face[:catalog, ´0.0.1´].download
209           # ...
210
211
212
213       select
214
215       Ask the puppet master for a list of managed file resources for a node:
216
217       $ puppet catalog select --terminus rest somenode.magpie.lan file
218

NOTES

220       This subcommand is an indirector  face,  which  exposes  find,  search,
221       save,  and destroy actions for an indirected subsystem of Puppet. Valid
222       termini for this face include:
223
224       ·   compiler
225
226       ·   json
227
228       ·   msgpack
229
230       ·   rest
231
232       ·   store_configs
233
234       ·   yaml
235
236
237
239       Copyright 2011 by Puppet Inc. Apache 2 license; see COPYING
240
241
242
243Puppet, Inc.                     January 2019                PUPPET-CATALOG(8)
Impressum