[Puppet Users] Hiera lookups in Ruby code

2014-04-14 Thread Dirk Heinrichs
Hi, is it possible to do Hiera lookups inside Ruby code, for example in a provider for a new resource type? If so, how? Thanks... Dirk -- *Dirk Heinrichs*, Senior Systems Engineer, Engineering Solutions *Recommind GmbH*, Von-Liebig-Straße 1, 53359 Rheinbach *Tel*: +49 2226 159

Re: [Puppet Users] Hiera lookups in Ruby code

2014-04-14 Thread Felix Frank
Hi, basically you need to mimic the behavior of Puppet's own hiera() function to talk to hiera's ruby API, see https://github.com/puppetlabs/puppet/blob/master/lib/puppet/parser/functions/hiera.rb#L23 Perhaps even more interesting, the way the hiera CLI tool uses the API,