When you use the hiera() function, you ate by definition not doing automatic param lookup. :-) whatever you put in for the first argument is the key that will be looked up via hiera verbatim. If you leave the class parameter without a default and instantiate it without a value, puppet will prefix the name of the class to the param name with double colons and use that as the lookup key in hiera.
-- Brian Lalor bla...@bravo5.org On Apr 18, 2013, at 4:15 PM, Alaric <paxindust...@gmail.com> wrote: > This may be a dumb question, but here goes > > > So I'm running on Puppet 3.1.1 on RHEL5, and i've been using Hiera since > 2.5/2.6 ish and it's been great!! I was reading up on Automatic Parameter > Lookups and would love to use it for my modules. But I can't seem to ever > get Hiera/Puppet to load the value i've set in my yaml files. I feel like I > must be missing something. > > > I've worked my way through the docs, and am just not sure what I'm missing. I > decided to use the 2.7 example, just to see what it did and noticed that this > > $puppetservertest = hiera('puppet::puppetservertest', 'test'), > > > Doesn't work, > > but this > > $puppetservertest = hiera('puppetservertest', 'test'), > > Does! > > I'm working on my puppet module, so I was expecting the lookup to grab the > variable from my puppet.yaml file (which it does in the second example) > > My test puppet.yaml file is pretty simple, it looks like this > > > # Parameters for Puppet Class > --- > puppetservertest: - 'puppet.example.com' > > > If anyone can shed some light on this it would be awesome! > > Thanks > > -a > > -- > 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 post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.