Hi Eric,
By default, hiera-cli uses /etc/hiera.yaml, hiera-puppet uses
/etc/puppet/hiera.yaml as config file. That was my mistake starting
using hiera cli for testing.
Btw, "facter --puppet region" wil also work, so no need for grep anymore.
On 05/09/2013 04:34 AM, Eric wrote:
When I run puppet on a client it says it can't find a parameter in
hiera, but If I run the hiera application on my puppet master and give
it the same facts that my client has, it finds them just fine. Why is
that?
Here's how my client sees itself:
[root@tag5-4-qa-sjc ~]# facter --puppet | grep region
region => northamerica
[root@tag5-4-qa-sjc ~]# facter --puppet | grep datacenter
datacenter => sjc
[root@tag5-4-qa-sjc ~]# facter --puppet | grep environment
environment => qa
[root@tag5-4-qa-sjc ~]# facter --puppet | grep machinetype
machinetype => tag
[root@tag5-4-qa-sjc ~]# facter --puppet | grep hostname
hostname => tag5-4-qa-sjc
I run puppet and get this error:
err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Could not find data item ak_auth_primary in any Hiera data
file and no default supplied at /etc/puppet/manifests/site.pp:11 on
node tag5-4-qa-sjc.domain.net <http://tag5-4-qa-sjc.domain.net>
on my puppet master server:
$ hiera ak_auth_primary region=northamerica datacenter=sjc environment=qa
Answer: ops1-1-qa-sjc
$ hiera ak_auth_primary region=northamerica datacenter=sjc
environment=qa machinetype=tag hostname=tag5-4-qa-sjc
Answer: ops1-1-qa-sjc
Is it because I'm using an older version of Puppet with Hiera? I'm not
quite ready to upgrade to version 3 yet, but I plan to.
[root@tag5-4-qa-sjc ~]# rpm -qa | grep puppet
puppet-2.7.14-1.el6.noarch
user@puppet-server$ sudo rpm -qa | egrep '(puppet|hiera)'
puppet-2.7.12-1.el6.noarch
puppet-dashboard-1.2.6-1.el6.noarch
hiera-1.2.1-1.el5.noarch
puppet-server-2.7.12-1.el6.noarch
hiera-puppet-1.0.0-1.el5.noarch
--
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.
--
Johan De Wit
Open Source Consultant
Red Hat Certified Engineer (805008667232363)
Puppet Certified Professional 2013 (PCP0000006)
_________________________________________________________
Open-Future Phone +32 (0)2/255 70 70
Zavelstraat 72 Fax +32 (0)2/255 70 71
3071 KORTENBERG Mobile +32 (0)474/42 40 73
BELGIUM http://www.open-future.be
_________________________________________________________
--
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.