| The man page assumes it is understood how hiera works in combination with a puppet configuration, and environment and node. Lookup uses the setting for global hiera.yaml from puppet's config, and the environment to find the environment level hiera.yaml as well as the resulting modulepath for the environment (for hiera.yaml files in modules). If it is given a node, the information for that node is looked up, and it will use the environment that was used for that node. The environment can also be given on the command line, and if neither is given it probably defaults to "production". If a node is not given facts generally must be given on the command line since most hiera.yaml files are based on interpolating facts. (Note that there is a ticket about the node's environment to use, if it should be the one that was reported last, or the one that a node will be given on the next compilation.) So, in summary it is something like: use the --node option, or specify facts and environment on the command line. |