You have declared a full folder path instead of a relative one. 
Change "/node/%{fqdn}" to "node/%{fqdn}" and it should work.
Also as an aside, I would move your defaults to the end of the lookup list. 
The lookup should go from most specific to least specific.

- Tony

On Tuesday, December 2, 2014 9:16:49 AM UTC-8, leam hall wrote:
>
> I'm trying to move forward with our PE setup. However, I'm new and it's 
> going slow. Right now I'm stuck on getting a node based json file to be 
> read for hiera. 
>
> ###
> # heira.yaml
> # restart pe-puppet each time this file has been edited.
>
> ---
> :backends:
>   - yaml
>   - json
> :hierarchy:
>   - defaults
>   - "/node/%{fqdn}"
>   - "%{clientcert}"
>   - "%{environment}"
>   - global
>
> :yaml:
> # datadir is empty here, so hiera uses its defaults:
> # - /var/lib/hiera on *nix
> # - %CommonAppData%\PuppetLabs\hiera\var on Windows
> # When specifying a datadir, make sure the directory exists.
>   :datadir: "/var/lib/hiera"
>
> :json:
>   :datadir: "/var/lib/hiera"
>
> ###
> # If I have in /var/lib/hiera/global.json:
> {
>   "admins" : [
>     "morticia",
>     "gomez",
>     "lurch",
>     "hand"
>     ]
> }
>
> # I can do:
>  hiera admins
> ["morticia", "gomez", "lurch", "hand"]
>
>
> # If I move the file to node/`facter fqdn`.json
> # I get no admins. 
>
> hiera admins
> nil
>
>
> # What am I missing? At this point I'm assuming operator error but don't 
> know how to fix it.
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f0d431aa-d686-4cb1-825d-8d51c56006a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to