On Wed, Dec 5, 2012 at 9:29 PM, Peter Brown <rendhal...@gmail.com> wrote: > On 5 December 2012 21:10, Vaidas Jablonskis <jablons...@gmail.com> wrote: >> On Wednesday, 5 December 2012 02:10:00 UTC, Pete wrote: >>> On 4 December 2012 21:17, Vaidas Jablonskis <jablo...@gmail.com> wrote: >>> >>> One last question. >>> I use a node level variable to specify the location of a node. >>> I use this for setting variables specific to that location like different >>> puppet master ip and nagios ip for the office and such. >>> I want to use that variable in hiera for the same purpose. >>> I have this in my hiera.yaml file. >>> >>> --- >>> :hierachy: >>> - %{::clientcert} >>> - %{::environment} >>> - %{location} >>> - virtual_%{::is_virtual} >>> - common >>> :backends: yaml >>> :yaml: >>> :datadir: /etc/puppet/hieradata >>> >>> it gets data from the common.yaml file but is seems to not get anything >>> from any of the other files. >>> it's definitely using the datadir because thats where the common.yaml >>> file is as well as the rest of the data files. >>> Am I missing something? >>> >> When you specify variables in hiera.yaml configuration file, then they are >> facts, not actual Puppet variables. So in this case you have it wrong. >> >> Instead of %{::environment}, use %{environment}, because a fact is always >> going to be a top scope variable. > > > That doesn't seem to work either... > I tried putting in another entry called extra (no var just the name) and it > didn't get used either. > So it's like it's not using anything that isn't called common.yaml > > So my guess is it's not the variables it's something else. > > Anyone got any ideas? > Or some docs I can dredge through?
hiera generates great traces if you enable it. I *think* you enable debug on the master to turn it on, but there might be something else you have to do. If all else fails, the code is actually pretty straight-forward... -- Chad M. Huneycutt -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.