Ask Your Question

how to set hiera config path?

asked 2013-04-06 09:48:09 -0600

deric gravatar image

I have puppet 3.1.1 and hiera 1.1.2, where do I specify current hiera config file?


hiera_config = /etc/puppet/hiera.yaml

however when I run hiera from command line the config path is /var/lib/hiera

$ hiera ssh_users --debug
DEBUG: Sat Apr 06 16:42:22 +0200 2013: Hiera YAML backend starting
DEBUG: Sat Apr 06 16:42:22 +0200 2013: Looking up ssh_users in YAML backend
DEBUG: Sat Apr 06 16:42:22 +0200 2013: Looking for data source defaults
DEBUG: Sat Apr 06 16:42:22 +0200 2013: Cannot find datafile /var/lib ...
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-04-06 13:35:48 -0600

jonn gravatar image

updated 2013-04-06 13:38:09 -0600

Hiera uses different config file locations depending on how it was invoked; the command line hiera tool won't be looking in puppet.conf.

As the doc that I've linked to describes, the default location for the command line tool will be /etc/hiera.conf on Unix, and if that file exists but contains no data, it will look in /var/lib/hiera for yaml source files. I think this may be the behaviour that you're seeing.

edit flag offensive delete link more


On some versions, I've had to symlink /etc/puppet/hiera.yaml to /etc/hiera.yaml.

Ancillas gravatar imageAncillas ( 2013-04-08 19:57:12 -0600 )edit

Thanks, that explains it. I'm versioning /etc/puppet folder in git, so I'd like to keep the configuration at one place, so that I can reproduce it in testing env.

deric gravatar imagederic ( 2013-04-12 03:16:37 -0600 )edit

on Debian, puppet 3.3.0 from puppetlabs the default /etc/hiera.yaml is distributed with the package `rm /etc/hiera.yml` `ln -s /etc/puppet/hiera.yaml /etc/hiera.yaml`

deric gravatar imagederic ( 2013-09-18 06:54:38 -0600 )edit

answered 2013-04-06 11:02:10 -0600

xtraclass gravatar image

What is the value of $confdir ?

I am wondering about your /var/lib ...

edit flag offensive delete link more



deric gravatar imagederic ( 2013-04-12 03:14:07 -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


Asked: 2013-04-06 09:48:09 -0600

Seen: 6,566 times

Last updated: Apr 06 '13