On Wednesday, October 3, 2012 10:03:17 AM UTC-5, Jakov Sosic wrote:
>
> Hi. 
>
> I would like to setup my manifests, so that variable data is gathered 
> from hiera, if it's available there, and if not, then to fallback on 
> some predefined value... 
>
> Something like this: 
>
> $my_var = hiera('myvar') || 'base_value' 
>
> So if there is no myvar in hiera data, that manifest falls back to 
> base_value. Is that possible somehow? 
>
>
$my_var = hiera('somevar', 'some_default') will do exactly that.
 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/5vVlXJWbRIUJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to