I have been trying to figure out for some time, I am using
puppet-2.6.11 on RedHat 5.6 and hiera 0.1.0.
Anytime I add a new hostgroup I can;t get hiera to pick up or parse
that directory structure correctly.

Has anyone ever run into this issue? or is there something simple I am
missing here. Really stuck here so would appreciate any advice
( please bear in mind I am sure the config files for .yaml in the new
directories are correct i've checked this dozens of times )

Here is my hiera.yaml file:
##############################################
---
:backends: - yaml

:logger: console

:hierarchy: - hostgroups/%{hostgroup}/%{hostgroup}
            - hostgroups/%{hostgroup}/%{site}/%{site}
            - hostgroups/%{hostgroup}/%{site}/%{hostname}
            - defaults
:yaml:
   :datadir: /etc/puppet/manifests/hiera

###############################################

Her is my site.pp file:
##########################################
node default {
   $region    = extlookup( "region"    )
   $hostgroup = extlookup( "hostgroup" )
   $site      = extlookup( "site"      )
   hiera_include( "global_classes" )     # This is maintained in
defaults.yaml
   hiera_include( "hostgroup_classes" )  # Maintained in hostgroups/
<hostgroup>/<hostgroup>.yaml
   hiera_include( "site_classes" )       # Maintained in hostgroups/
<hostgroup>/<site>/<site>.yaml
   hiera_include( "node_classes" )       # Maintained in hostgroups/
<hostgroup>/<site>/<hostname>.yaml
}

$extlookup_datadir = "/etc/puppet/manifests/extdata"
##############################################


So for example I have the following directory structure for hiera
lookups.

/etc/puppet/manifests/hiera/hostgroups
drwxr-xr-x  4 puppet puppet 4096 Aug 10 19:00 core
drwxr-xr-x  2 puppet puppet 4096 Aug 10 09:13 default
drwxrwxr-x  3 puppet puppet 4096 Mar 28 11:28 devel

When I do a lookup in the "core" directory puppet returns with no
issues on the client.
If I change the hostgroup to "devel" I get an error ( ALL the .yaml
files are correct and hiera lookups work for hostgroup "devel"
whenever I do my testting)

/etc/puppet/manifest/extdata/host1.csv < - This is Good

site,hbr5
hostgroup,core
region,us

change to:

site,hbr5
hostgroup,devel
region,us

puppet agent -tv --noop
err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Could not find data item host_usertags in any Hiera data file
and no default supplied at /etc/puppet/modules/icap_user/manifests/
accounts/realize.pp:2 on node xxxx
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run





-- 
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.

Reply via email to