On Tue, Nov 04, 2008 at 04:01:06PM +0100, Thomas Bellman wrote:
>
> Marcin Owsiany wrote:
>
> > On Tue, Nov 04, 2008 at 06:03:24AM -0800, Jeff wrote:
> >> How do I reference the values of the array in this block:
> >>
> >> notify { ["bin", "etc", "lib", "man", "src", "tmp", "var"] :
> >> message => "jeff: $name"
> >> }
> >>
> >> i.e., what do I use in place of "$name"?
> >
> > As far as I know, foo { [a, b, c]: } is purely a syntactic shortcut for:
> > foo { a: } foo { b: } foo { c: }
> >
> > In other words, there are actually 7 different resources in your example.
>
> But, what he wants to do is to avoid having to repeat all the "bin", "etc",
> and so on; he doesn't want to write:
>
> notify {
> "bin": message => "jeff: bin";
> "etc": message => "jeff: etc";
> "lib": message => "jeff: lib";
> }
Oh, I thought that Jeff's example did do that, but he wanted:
message => "jeff: bin etc lib man ..."
Now I tested this and can see that $name gets expanded to an empty
string in his example, which I think is a bug.
--
Marcin Owsiany <[EMAIL PROTECTED]> http://marcin.owsiany.pl/
GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216
"Every program in development at MIT expands until it can read mail."
-- Unknown
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---