Issue #20984 has been updated by Charlie Sharpsteen. Status changed from Unreviewed to Needs More Information Assignee set to Nathaniel Baldwin
Using `::module_name` implies that you are trying to access a global variable. The [reference page on variables](http://docs.puppetlabs.com/puppet/3/reference/lang_variables.html#parser-set-variables) describes `module_name` as a local variable which means that it cannot be accessed if prefixed with `::`. Does the lookup work if you remove the leading double colon in hiera.yaml? ---------------------------------------- Bug #20984: module_name no longer seems to work in hiera config https://projects.puppetlabs.com/issues/20984#change-91920 * Author: Nathaniel Baldwin * Status: Needs More Information * Priority: Normal * Assignee: Nathaniel Baldwin * Category: * Target version: * Affected Puppet version: 3.2.1 * Keywords: * Branch: ---------------------------------------- In my /etc/puppet/hiera.yaml config, my hierarchy starts like this: :hierarchy: - %{::module_name} I use this to store stuff like credentials in hiera that can be looked up on a per-module basis, so I then have hiera files that look like: /var/lib/hiera/rancid.yaml --- rancid_password: 'supersecretnobodywillguess' In puppet 3.1.0 this was working just fine. When I upgraded my puppetmaster to 3.2.1 just now, it no longer works; when I try a puppet agent run on a node that uses this setup, I get: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find data item rancid_password in any Hiera data file and no default supplied at /etc/puppet/modules/rancid/manifests/init.pp:7 on node mynode.nodeville.com Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run I saw that there were some changes related to calling_module and calling_class in the latest puppet release, so I tried those in place of module_name as well to no avail. I hope I'm just doing something wrong, but this does seem like a bug. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
