> Maybe this is a bit overkill for your requirements, but this was > > actually one use case for Jerakia (http://jerakia.io). Hiera 5 can use > > it as a backend from your Puppet implementation, and because it runs > > over an HTTP API other tools can easily hook into the same data > > lookups... for example there is now an Ansible lookup plugin that can > > pull the same data as Puppet. It also has a client library written in > > Ruby which would hook into your script. > > So are you reaching out to Hiera 5 from Jerakia to do that and how are > you doing it? >
The other way around, Hiera reaches out to Jerakia. Jerakia is standalone but one way it can be used is as a backend to Hiera - it can integrate with Puppet using a Hiera 5 backend that ships with the crayfishx/jerakia Puppet module. http://jerakia.io/integration/puppet > > Are you as Hendrik suggested doing a compilation? What I saw as a big > difference is the whole context/scope that Hiera 5 is aware of, for > doing there lookups, which works for anything being called from puppet > code, but is kinda hard for an external query that must mimick that > context. > No - if you are talking about looking up only data that is in your hieradata path in a specific environment, it would be easy to get Jerakia to read from the same file hierarchy, if you're using features inside of Hiera / Puppet such as module level Hiera lookups and Puppet variable interpolation, then this would, as Henrik said, require you to be in an actual Puppet environment so it would be difficult to expose this in the same way. Your original post said you are on Hiera 3 though so it's highly the data you have to date would be very easy to expose using Jerakia. Scope (eg: facts/variables..etc) shouldn't be an issue, you can hook up Jerakia to pull the scope data from PuppetDB when you query data from another tool. Craig -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CACxdKhGHSs93mJUpYC_J9pZ%2BgOt00DCiJo5aMpi2tJhMOkbGEA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.