Ask Your Question

Hiera and custom facts [closed]

asked 2014-09-10 09:43:08 -0600

The old man gravatar image


So seeing as hiera can use custom facts, what happens if the custom fact does not exist, does it error or does it just go down the hierarchy ?

I have a situation where some nodes have facts that doesn't exist in others.

I am aware I can add the facts if it doesn't exist using puppet, but would prefer to do this with facter and hiera only.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by The old man
close date 2014-09-10 12:49:03.570059

1 Answer

Sort by ยป oldest newest most voted

answered 2014-09-10 09:50:42 -0600

llowder gravatar image

If the fact doesn't exist, it will be nil or undef.

If it is part of a hierarchy, then the resulting file won't exist and it will just get skipped. You'll see some messages about it when running in debug mode, but otherwise it will just work as usual.

edit flag offensive delete link more


Makes sense and works. Thanks

The old man gravatar imageThe old man ( 2014-09-10 12:47:54 -0600 )edit

Question Tools


Asked: 2014-09-10 09:43:08 -0600

Seen: 470 times

Last updated: Sep 10 '14