On Oct 29, 5:40 pm, Luke Kanies <[EMAIL PROTECTED]> wrote:
> On Oct 27, 2008, at 12:33 PM, Ryan Steele wrote:
> > That answers part of my question about whether the "non-
> > resource" (obviously more appropriately titled "language") bits of the
> > manifests are evaluated before the resources. But I'm not sure it
> > answered the the other question regarding the order of evaluation of
> > the language constructs performed on the puppetmaster. So in the case
> > of:
>
> > if $foo { $baz = "quux" }
> > $foo = "bar"
>
> > ...does the puppetmaster care in which order these types of language
> > constructs exist in the given resource? Or does it handle the
> > assignments before any control structures are evaluated?
>
> Older versions of Puppet (0.23.x, I think) attempted to pick an
> appropriate order for the different kinds of statements, but
> currently, all of the statements are just evaluated in file order.
Interesting, you are right. Which means the statements are somewhat
order dependent. For example, the manifest snippet above will not
set $baz. But swap the order of the statements, and $baz is properly
set to "quux". Thanks for wandering down this tangent with me. :)
Ryan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---