Hmm, I moved the config file to /etc/puppet/ but my client is still giving me grief.
On Tuesday, July 10, 2012 9:15:49 AM UTC-5, Andreas Paul wrote: > > AFAIK hiera-puppet looks for > */etc/puppet/hiera.yaml* > whereas the hiera CLI looks for > */etc/hiera.yaml* > > You can still use the CLI by specifying the config file > hiera -c /etc/puppet/hiera.yaml sshpackages environment=development > or just symlink it :) > > On Tuesday, July 10, 2012 3:31:43 PM UTC+2, Luke Baker wrote: >> >> Hey there, >> >> I'm new to hiera and I' m looking to configure it to use multiple >> environments. I'm able to query hiera keys from using the hiera CLI, >> however my clients seem to be having problems identifying the look up >> variables. >> >> *On the puppet master, CLI query* >> [root@puppet-dev puppet]# hiera -a sshpackages environment=development >> ["openssh", "openssh-clients"] >> * >> >> Puppet master, testing gem load* >> [root@puppet-dev puppet]# irb >> irb(main):001:0> require 'rubygems' >> => true >> irb(main):002:0> require 'hiera' >> Invalid gemspec in >> [/usr/lib/ruby/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date >> format in specification: "2011-08-25 00:00:00.000000000Z" >> => true >> >> >> *Directory structure* >> [root@puppet-dev puppet]# tree /etc/puppet/environments/ -d -L 2 >> /etc/puppet/environments/ >> ├── development >> │ ├── hieradata >> │ └── modules >> └── production >> ├── hieradata >> └── modules >> >> >> *Configuration file* >> [root@puppet-dev puppet]# cat /etc/hiera.yaml >> --- >> :hierarchy: >> - %{environment} >> - %{operatingsystem} >> - common >> :backends: >> - yaml >> :yaml: >> :datadir: '/etc/puppet/environments/%{environment}/hieradata/' >> >> >> *Test manifest* >> class hiera_test { >> >> $packages = hiera('sshpackages') >> notify { $packages: } >> } >> >> >> However, my test client errors out with the following message: >> err: Could not retrieve catalog from remote server: Error 400 on SERVER: >> Could not find data item sshpackages in any Hiera data file and no default >> supplied at >> /etc/puppet/environments/development/modules/hiera_test/manifests/init.pp:16 >> on node bakerlu-sb.missouri.edu >> >> Anyone have words of wisdom or see anything wrong with my configuration? >> >> >> >> -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/4xgy0EDr54IJ. 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.