Hello,
I see you are looking for 'match_address', but in Hiera it is stored as 'sshdconfig::match_address'. -----Original message----- From: Dan Crisp <djc7...@gmail.com> Sent: Tuesday 25th February 2020 13:42 To: Puppet Users <puppet-users@googlegroups.com> Subject: Re: [Puppet Users] Hiera Setup Lookup Complaining I included the --compile option. Now (not sure whether as a result of use --option) I can see /etc/puppetlabs/code/environments/production/data/nodes/nodename.domain.com.yaml in the output: Searching for "lookup_options" Global Data Provider (hiera configuration version 5) No such key: "lookup_options" Environment Data Provider (hiera configuration version 5) Using configuration "/etc/puppetlabs/code/environments/production/hiera.yaml" Merge strategy hash Hierarchy entry "Per-node data" Path "/etc/puppetlabs/code/environments/production/data/nodes/nodename.fixnetix.com.yaml" Original path: "nodes/%{trusted.certname}.yaml" No such key: "lookup_options" Hierarchy entry "Per-OS defaults" Path "/etc/puppetlabs/code/environments/production/data/os/RedHat.yaml" Original path: "os/%{facts.os.family}.yaml" Path not found Hierarchy entry "Common data" Path "/etc/puppetlabs/code/environments/production/data/common.yaml" Original path: "common.yaml" Path not found Searching for "match_address" Global Data Provider (hiera configuration version 5) No such key: "match_address" Environment Data Provider (hiera configuration version 5) Using configuration "/etc/puppetlabs/code/environments/production/hiera.yaml" Hierarchy entry "Per-node data" Path "/etc/puppetlabs/code/environments/production/data/nodes/lhcsrvmtrrsl01.fixnetix.com.yaml" Original path: "nodes/%{trusted.certname}.yaml" No such key: "match_address" Hierarchy entry "Per-OS defaults" Path "/etc/puppetlabs/code/environments/production/data/os/RedHat.yaml" Original path: "os/%{facts.os.family}.yaml" Path not found Hierarchy entry "Common data" Path "/etc/puppetlabs/code/environments/production/data/common.yaml" Original path: "common.yaml" Path not found Function lookup() did not find a value for the name 'match_address' Still no luck finding the requested value though. Thanks, Dan. On Monday, February 24, 2020 at 7:13:25 PM UTC, Henrik Lindberg wrote: Dan Crisp wrote: > environment/production/data/nodes/nodename.domain.com.yaml As you can see in the output - the hiera path expanded to: Path "/etc/puppetlabs/code/environments/production/data/nodes/.yaml" Meaning that trusted.certname was empty. It would be empty if the node "nodename.domain.com <http://nodename.domain.com> " never checked in with the puppet server to deposit any facts. It will do that on its first agent run though. Meanwhile you have to supply your own facts (and trusted) to do lookups as it will be done when the node later requests a catalog. Look at the help for the various flags to the lookup command to learn how to give it values for facts and trusted information. - henrik -- Visit my Blog "Puppet on the Edge" http://puppet-on-the-edge.blogspot.se/ <http://puppet-on-the-edge.blogspot.se/> -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com <mailto:puppet-users+unsubscr...@googlegroups.com> . To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/51b5a4bd-0e18-42c9-8cc3-9b77bcfd4218%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/zarafa.5e553d3f.4927.3fd0a0df5a56792e%40anjie.dontpanic.nl.