Ask Your Question

Hiera, difference between default.yaml and common.yaml

asked 2013-09-06 05:37:22 -0500

asktbt gravatar image


I'm dropping more and more stuff into Hiera; especially the default.yaml I fill up with a lot of default settings for all hosts. From the Hiera configuration there's also the common.yaml. I wonder: what is the intention of the common.yaml file in comparison to the default.yaml? I don't really get the conceptional difference between them.

edit retag flag offensive close merge delete


Paste your hiera.yaml file into your question. It'll be easier to explain the differences in your setup if we can see the hierarchy you've created.

ramindk gravatar imageramindk ( 2013-09-06 13:28:31 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2013-09-06 13:55:36 -0500

Ancillas gravatar image

It's just convention. Your personal hiera.yaml file determines how those files are used, or even if they're used. I myself prefer common.yaml because it makes sense to me that those are common configs. Other people may choose default.yaml because they view those values as being default unless they're overridden in another yaml file. I myself don't like this because I think of modules as having defaults, my common.yaml configuration as having my configs common to my entire infrastructure, and my other yaml files as having configs for specific applications and clusters.

In ... (more)

edit flag offensive delete link more



Thanks. That was what I experienced from the usage of those files. For an easier overview (and to do my non-puppet-colleagues a favor) I'll remove the unused one.

asktbt gravatar imageasktbt ( 2013-09-09 05:51:57 -0500 )edit

answered 2013-09-06 12:06:43 -0500

Willi gravatar image

i dont use any common beside default.yaml file ... all my defaults and common values go straight to the common.yaml file. delete the default.yaml file from filesystem and hiera.yaml conf if you dont need it

one (maybe good) reason for a default.xml: define empty variables for all "missing" variables to avoid failures during youre puppet runs. in this case....common.yaml defines variables that belong to all your environments/classes/whatever...and default.yaml just holds empty variables to prevent failure during puppet runs (but it also depends on your type of variables).

like already mentioned ... (more)

edit flag offensive delete link more

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: 2013-09-06 05:37:22 -0500

Seen: 807 times

Last updated: Sep 06 '13