On Feb 7, 2012, at 2:13 PM, jimbob palmer wrote:

> 2012/2/7 Jan Ivar Beddari <jan.ivar.bedd...@uib.no>:
>> On 02/07/2012 03:54 PM, jimbob palmer wrote:
>>>> 
>>>> 
>>>> # The right way
>>>> class foo::specific {
>>>>    include 'foo::common'
>>>>    # specific stuff
>>>> }
>>> 
>>> 
>>> So can I be sure that the include will run first, before the "specific
>>> stuff" here?
>> 
>> 
>> Kind of, but you need to change your thinking. The include does not _run_
>> before the specific stuff, it _declares_ foo::common. The result is not a
>> sequential run of something, but a graph - a catalog of resources and
>> relationships :)
> 
> Yikes so how can I be sure that the included stuff gets included
> before I need it? Say it pulls in some variables and package
> requirements.
----
require [ Class["some_class"], Package["some_package"] ]
----
> And a related question: if I have a case statement at the top of my
> class that sets a variable, how can I be sure the variable will be set
> before I need it lower down in the same class?
----
leap of faith

Craig

-- 
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.

Reply via email to