Ask Your Question

hiera.yaml with structured facts

asked 2015-12-01 17:44:34 -0600

lclegg gravatar image

updated 2015-12-01 18:04:36 -0600

I'm running the latest/greatest Open Puppet on both my Puppetserver and clients all on Oracle Linux V6.7.

I use structured facts from /opt/puppetlabs/facter/facts.d/myfacts.txt. For example: my_role=DATABASE

Then in my /etc/puppetlabs/code/hiera.yaml file I have this line in the hierarchy:


This all works just fine. When a server is identified as a DATABASE server then the DATABASE.yaml file is used appropriately.

What I want to do is to be able to use a fact like this:


and have hiera run thru both the DATABASE.yaml and WEB.yaml files.

I'm not being successful at all. I'm not sure if this is possible or if I just haven't figured out the right way to set things up. Any guidance is very much appreciated. Thank you,


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-12-02 03:47:15 -0600

strictly speaking a host should generally have just one role. functionality of that role is that its made uip of one or more profiles.

web, database etc would be the profile

so role for this box would include web/database + anyother

have a read of: good intro to roles and profiles

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: 2015-12-01 17:44:34 -0600

Seen: 245 times

Last updated: Dec 02 '15