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       --terminus _TERMINUS
40              Indirector faces expose indirected subsystems of  Puppet.  These
41              subsystems  are  each able to retrieve and alter a specific type
42              of data (with the familiar actions of find,  search,  save,  and
43              destroy) from an arbitrary number of pluggable backends. In Pup‐
44              pet parlance, these backends are called terminuses.
45
46              Almost all indirected subsystems have a rest terminus  that  in‐
47              teracts  with  the puppet master´s data. Most of them have addi‐
48              tional terminuses for various local data models,  which  are  in
49              turn used by the indirected subsystem on the puppet master when‐
50              ever it receives a remote request.
51
52              The terminus for an action is often determined by  context,  but
53              occasionally needs to be set explicitly. See the "Notes" section
54              of this face´s manpage for more details.
55

ACTIONS

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

EXAMPLES

165       find
166
167       Get facts from the local system:
168
169       $ puppet facts find
170
171       show
172
173       retrieve facts:
174
175       $ puppet facts show os
176
177       upload
178
179       Upload facts:
180
181       $ puppet facts upload
182

NOTES

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