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

NAME

6       puppet-facts - Retrieve and store facts.
7

SYNOPSIS

9       puppet facts action [--terminus _TERMINUS]
10

DESCRIPTION

12       This subcommand manages facts, which are collections of normalized sys‐
13       tem information used by Puppet. It can read facts directly from the lo‐
14       cal system (with the default facter terminus).
15

OPTIONS

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

ACTIONS

63       find - Retrieve a node´s facts.
64              SYNOPSIS
65
66              puppet facts find [--terminus _TERMINUS] [node_certname]
67
68              DESCRIPTION
69
70              Retrieve a node´s facts.
71
72              RETURNS
73
74              A hash containing some metadata and (under the "values" key) the
75              set of facts for the requested node. When  used  from  the  Ruby
76              API: A Puppet::Node::Facts object.
77
78              RENDERING  ISSUES:  Facts  cannot  currently  be  rendered  as a
79              string; use yaml or json.
80
81              NOTES
82
83              When using the facter terminus, the host argument is ignored.
84
85       info - Print the default terminus class for this face.
86              SYNOPSIS
87
88              puppet facts info [--terminus _TERMINUS]
89
90              DESCRIPTION
91
92              Prints the default terminus class for this subcommand. Note that
93              different  run modes may have different default termini; when in
94              doubt, specify the run mode with the ´--run_mode´ option.
95
96       save - API only: create or overwrite an object.
97              SYNOPSIS
98
99              puppet facts save [--terminus _TERMINUS] key
100
101              DESCRIPTION
102
103              API only: create or overwrite an object. As the Faces  framework
104              does  not  currently accept data from STDIN, save actions cannot
105              currently be invoked from the command line.
106
107       show - Retrieve current node´s facts.
108              SYNOPSIS
109
110              puppet facts [--terminus _TERMINUS] [--config-file path] [--cus‐
111              tom-dir  path]  [--external-dir  path] [--no-block] [--no-cache]
112              [--show-legacy] [--value-only] [--timing] [facts]
113
114              DESCRIPTION
115
116              Reads facts from the local system using facter terminus. A query
117              can  be  provided  to  retrieve just a specific fact or a set of
118              facts.
119
120              OPTIONS --config-file <path> - The location of the  config  file
121              for Facter.
122
123              --custom-dir <path> - The path to a directory that contains cus‐
124              tom facts.
125
126              --external-dir <path> - The path to a  directory  that  contains
127              external facts.
128
129              --no-block - Disable fact blocking mechanism.
130
131              --no-cache - Disable fact caching mechanism.
132
133              --show-legacy - Show legacy facts when querying all facts.
134
135              --timing - Show how much time it took to resolve each fact.
136
137              --value-only  -  Show  only  the value when the action is called
138              with a single query
139
140              RETURNS
141
142              The output of facter with added puppet specific facts.
143
144              NOTES
145
146       upload - Upload local facts to the puppet master.
147              SYNOPSIS
148
149              puppet facts upload [--terminus _TERMINUS]
150
151              DESCRIPTION
152
153              Reads facts from the local system  using  the  facter  terminus,
154              then saves the returned facts using the rest terminus.
155
156              RETURNS
157
158              Nothing.
159
160              NOTES
161
162              This action requires that the Puppet Server´s auth.conf file al‐
163              low PUT or save access to the /puppet/v3/facts API endpoint.
164
165              For details on configuring Puppet Server´s auth.conf, see:
166
167              https://puppet.com/docs/puppetserver/latest/con
168              fig_file_auth.html
169

EXAMPLES

171       find
172
173       Get facts from the local system:
174
175       $ puppet facts find
176
177       show
178
179       retrieve facts:
180
181       $ puppet facts show os
182
183       upload
184
185       Upload facts:
186
187       $ puppet facts upload
188

NOTES

190       This  subcommand  is  an  indirector  face, which exposes find, search,
191       save, and destroy actions for an indirected subsystem of Puppet.  Valid
192       termini for this face include:
193
194facter
195
196json
197
198memory
199
200network_device
201
202rest
203
204store_configs
205
206yaml
207
208
209
211       Copyright 2011 by Puppet Inc. Apache 2 license; see COPYING
212
213
214
215Puppet, Inc.                     October 2021                  PUPPET-FACTS(8)
Impressum