On Sun, May 9, 2010 at 11:53 AM, Markus Roberts <[email protected]>wrote:
>
> I think from the bracketing text:
>
> Defined types can also use metaparameters, for instance we can use
>> ‘require’ inside of a definition. We can reference the values of those
>> metaparameters using built-in variables. Here’s an example:
>>
>
> ....and:
>
> > The above is perhaps not a perfect example,...
>
> ...that the intent of the example is to show what you can do (reference
> metaparameters as if they were variables) rather than what you should do.
> Perhaps what's needed is a more compelling case of why you might actually
> want to access metaparameters inside a defined type, and then just ditch the
> existing example?
>
Primarily I think that the intro language tutorial shouldn't go into any of
this at all, and should just show "yes, you can use metaparameters on
defined types too".
I just can't think of a defined type situation right now where you
absolutely want the require on the internal native type rather than on the
encapsulating defined type that couldn't be handled with internal
relationships?
I also don't understand how the plusignment operator works in this
situation. ie:
define d_exec() {
exec { $title:
...
require => Foo[bar],
}
if $require {
Exec[$title] { require +> $require }
}
}
Why doesn't this work? Shouldn't you be able to append to the require? If
not, what's the point of using the plusignment operator rather than just
doing:
define d_exec() {
exec { $title:
...
require => $require,
}
}
> -- Markus
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<puppet-dev%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-dev?hl=en.
>
--
nigel
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.