On Jun 8, 2011, at 8:45 AM, Aaron Grewell wrote: > Here's the thing though: since arrays are the only native method of looping, > Puppet needs to handle arrays of all native types well. If it doesn't, from > an end-user perspective that's broken.
See, there's the crux of the issue: arrays are *not* a method of looping. Puppet's DSL is declarative, not procedural (imperative). What you are thinking of as "looping" is simply a convenient shorthand (syntactic sugar is the appropriate term). If you are thinking in procedural terms (which we've all done at one point or another), you're simply going to run around in circles ranting that Puppet is broken until you get your head wrapped around its declarative nature (much like I did/do). Puppet is not procedural. Never has been, never will be. You can probably meet your needs by thinking about the desired state in different terms and using extlookup, or using custom functions. If you are really insane, you can modify the Puppet backend to execute a file and read the output instead of reading the file directly, which might allow you to dynamically generate the manifests you want applied, though the added complexity may well be a net loss. In short, if you are thinking "procedural", then you have not yet drunk the Kool-Aide. Join us. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.