Search
Clear search
Close search
Main menu
Google apps
Groups
Sign in
Groups
Puppet Users
Conversations
About
Send feedback
Help
Hiera lookups in Ruby code
893 views
Skip to first unread message
Dirk Heinrichs
unread,
Apr 14, 2014, 11:55:05 AM
4/14/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
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 1596666
(Ansage) 1149
Email
:
d...@recommind.com
Skype
: dirk.heinrichs.recommind
www.recommind.com
Felix Frank
unread,
Apr 14, 2014, 12:28:10 PM
4/14/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
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,
https://github.com/puppetlabs/hiera/blob/master/bin/hiera#L249
HTH,
Felix
Reply all
Reply to author
Forward
0 new messages