Greetings,

I use lookup to get data out of hiera:

node some-host {
    class { 'foo':
        $bar = lookup('bar')
    }
}

I'd like to be able to query puppetdb to find out what hosts use various 
hiera keys.

So in the above example. Given bar return some-host.

I know I can write a parser to get the class "foo" that contains the hiera 
key "bar". Then using that class (foo in this case), I could query puppetdb 
with a class and get the host.

I know the hiera keys wouldn't show up in the facts report. I know that the 
hiera keys wouldn't show up in the catalog reports.

Is it possible to create a custom function like so:

my_lookup(key) {
    # somehow create a resource that I can query with puppetdb
   # and then use the real lookup:
   return lookup(key);
}

Any ideas about querying puppetdb to get used hiera keys in given hosts?

-m

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/10f366cf-3c51-4956-8e83-c20fcf61226cn%40googlegroups.com.

Reply via email to