It's been my understanding that the order in which resources are
defined having no bearing on the order of execution.  This would mean
that the only way to ensure one resource is declared after or before
another is with the use of certain metaparameters (e.g., before/
require and notify/subscribe), which is straightforward enough.
However, I'm not sure in what order statements are evaluated within a
given resource.  Take for example the documentation in the wiki entry
on definitions in the LanguageTutorial (http://reductivelabs.com/trac/
puppet/wiki/LanguageTutorial#definitions).


In the second example, there is an 'if' statement that sets the
'require' attribute for the 'exec { "create_repo_${name}": ... }'
resource.  If the 'if' statement is evaluated second, the 'require'
attribute will never be set, and the command might run without the
assurance that the Subversion package was installed.  So what
determines whether or not that 'if' statement is evaluated and
executed before the 'exec' resource is run?  Does the Puppet
interpreter realize that the 'if' statement provides information the
'exec' resource is potentially dependent on?  Or does it simply
evaluate non-resource statements first?  If the latter is true (and
this question is moot if the previous statement is incorrect), what
happens if a non-resource statement depends on another non-resource
statement; for example:


if $foo { $baz = "quux" }
$foo = "bar"


I attempted to draw these conclusions by glossing through the
PuppetInternals wiki page (http://reductivelabs.com/trac/puppet/wiki/
PuppetInternals), but didn't really find what I was looking for
(though it's certainly possible I overlooked that information).  I
appreciate any insight!
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to