Re: [Puppet Users] Optional values from Hiera (no default value)

2012-04-26 Thread Lars Francke
Hey Tim, thanks for your answer. > hiera() can take a second argument which is the default you want to > supply if no data store provides a value.  Before you ask, no, I don't > know where that's documented, but we've been using it for a while in > our puppet manifests and it has been mentioned o

Re: [Puppet Users] Optional values from Hiera (no default value)

2012-04-26 Thread Tim Mooney
In regard to: [Puppet Users] Optional values from Hiera (no default value),...: Hello Puppet List, I'm writing a module that should take an optional value and I want to get it (amongst other places) from Hiera. $repository = $::java_repository ? { undef => hiera('java_reposito

[Puppet Users] Optional values from Hiera (no default value)

2012-04-26 Thread Lars Francke
Hello Puppet List, I'm writing a module that should take an optional value and I want to get it (amongst other places) from Hiera. $repository = $::java_repository ? { undef => hiera('java_repository') default => $::java_repository, } But this fails because Hiera raises an error if it can'