On Sun, Aug 22, 2010 at 12:20 AM, Douglas Garstang
<doug.garst...@gmail.com> wrote:
> On Sun, Aug 22, 2010 at 12:02 AM, Joe McDonagh
> <joseph.e.mcdon...@gmail.com> wrote:
>> On 08/22/2010 02:42 AM, Douglas Garstang wrote:
>>
>>>
>>> This seems a bit weird to me. The second parameter isn't optional (I
>>> think the 2nd and 3rd parameters should be switched), which means that
>>> you MUST have a default value in there, which means, you might as well
>>> use the same value as in the file, which means the file is somewhat
>>> redundant. Anyone else see that?
>>>
>>> Doug.
>>>
>>
>> extlookup has always supported defaults, which were always optional. A
>> cursory look of the current code appears that it's also still an optonal
>> default.
>
> Hmmm, I'm too tired to try that again, but the next problem is that I
> want to be able to put these defaults in external files, but ALWAYS
> override them with the value passed from an external node. It's more
> specific after all. However, extlookup doesn't work like that. It only
> uses the default passed directly to extlookup when it's NOT in the
> files, therefore giving the files precedence.
>
> Doug.
>

Oh sweet....

    jboss::instance {
        tfel0:
            version                 => $jboss_version,
            naming_port             => 1099,
            cluster                 => "c0tfel0",
            java_heap_min           => $tfel0_elementsJBossHeapMin ? {
"" => extlookup("tfel0_elementsJBossHeapMin",
extlookup("elementsJBossHeapMin", "", "appDefaults") ), default =>
"${tfel0_elementsJBossHeapMin}" },

cascading defaults! Wooo!

Doug.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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