@@ -134,7 +134,9 @@ def help
134
134
The lookup command is a CLI for Puppet's 'lookup()' function. It searches your
135
135
Hiera data and returns a value for the requested lookup key, so you can test and
136
136
explore your data. It is a modern replacement for the 'hiera' command.
137
-
137
+ Lookup uses the setting for global hiera.yaml from puppet's config,
138
+ and the environment to find the environment level hiera.yaml as well as the
139
+ resulting modulepath for the environment (for hiera.yaml files in modules).
138
140
Hiera usually relies on a node's facts to locate the relevant data sources. By
139
141
default, 'puppet lookup' uses facts from the node you run the command on, but
140
142
you can get data for any other node with the '--node <NAME>' option. If
@@ -183,7 +185,8 @@ def help
183
185
* --environment <ENV>
184
186
Like with most Puppet commands, you can specify an environment on the command
185
187
line. This is important for lookup because different environments can have
186
- different Hiera data.
188
+ different Hiera data. This environment will be always be the one used regardless
189
+ of any other factors.
187
190
188
191
* --merge first|unique|hash|deep:
189
192
Specify the merge behavior, overriding any merge behavior from the data's
@@ -234,6 +237,13 @@ def help
234
237
To look up 'key_name' using the Puppet Server node's facts:
235
238
$ puppet lookup key_name
236
239
240
+ To look up 'key_name' using the Puppet Server node's arbitrary variables from a manifest, and
241
+ classify the node if applicable:
242
+ $ puppet lookup key_name --compile
243
+
244
+ To look up 'key_name' using the Puppet Server node's facts, overridden by facts given in a file:
245
+ $ puppet lookup key_name --facts fact_file.yaml
246
+
237
247
To look up 'key_name' with agent.local's facts:
238
248
$ puppet lookup --node agent.local key_name
239
249
0 commit comments