Ask Your Question
0

hiera not looking up all files

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

roguetech gravatar image

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

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
0

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

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

Comments

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 -0600 )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

Stats

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

Seen: 94 times

Last updated: Nov 11 '15