Ask Your Question

hiera not looking up all files

asked 2015-11-10 23:59:38 -0500

roguetech gravatar image

updated 2015-11-11 00:24:37 -0500

so my hiera.yaml file looks like this

:backends: - yaml

:hierarchy: - "%{::osfamily}/%{::operatingsystemrelease}" - common - defaults

:yaml: :datadir: "/etc/puppetlabs/puppet/hieradata"

and i have a file in the hieradata directory /Suse/12.0.yaml

when i run hiera is doesnt look at that file

hiera --debug ospackages osfamily=Suse operatingsystemrelease=12.0

DEBUG: 2015-11-11 17:21:20 +1100: Hiera YAML backend starting DEBUG: 2015-11-11 17:21:20 +1100: Looking up ospackages in YAML backend DEBUG: 2015-11-11 17:21:20 +1100: Looking for data source 12.0 DEBUG: 2015-11-11 17:21:20 +1100: Found ospackages in 12.0 ["DirectFB"]

but i run on client that has those facts i get

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Could not find data item ospackages in any Hiera data file

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-11 03:47:00 -0500

what hiera.yaml are you editing?

/etc/hiera.yaml should ideally be a link to /etc/puppetlabs/puppet/hiera.yaml

edit flag offensive delete link more


so i have lrwxrwxrwx 1 root root 33 Nov 6 12:16 /etc/hiera.yaml -> /etc/puppetlabs/puppet/hiera.yaml but hiera uses /etc/puppetlabs/code/hiera.yaml and i dont know why

roguetech gravatar imageroguetech ( 2015-11-11 17:33:44 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-11-10 23:59:38 -0500

Seen: 82 times

Last updated: Nov 11 '15