Hi, I have a best practices question. I have 3 classes that have to be run in a certain order. dhcp network must be run before nis which must be run before autofs. Originally, I was calling these functions from my workstation class, and assuming that the include statements would be run in order. Then I tried nesting the includes in the actual class (autofs includes nis, etc.) Things are still not executing in the order that I wanted. Do I have to include things, then set requires to work between the two objects? Is there something that I am missing. thanks, Dan --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Not sure what is ''best practice'', but maybe this will help a
little.
Please keep in mind, I''m new to puppet too.
You might look at:
http://reductivelabs.com/trac/puppet/wiki/TypeReference#available-metaparameters
specifically require and before
Possibly in the autofs class, resources might require =>
Class[nsswitch]
and resources in nsswitch might require => Class[network]
You might use variables to convey the specifics to these more general
classes
node ''somenode'' {
$nsswitch_use_nis = "true"
$network_use_dhcp = "true"
include network
include nsswitch
include autofs
}
On Sep 24, 10:52 am, Dan Bode <bod...@gmail.com>
wrote:> Hi,
>
> I have a best practices question.
>
> I have 3 classes that have to be run in a certain order.
>
> dhcp network must be run before nis which must be run before autofs.
>
> Originally, I was calling these functions from my workstation class,
> and assuming that the include statements would be run in order. Then I
> tried nesting the includes in the actual class (autofs includes nis,
> etc.)
>
> Things are still not executing in the order that I wanted.
>
> Do I have to include things, then set requires to work between the two
> objects? Is there something that I am missing.
>
> thanks,
>
> Dan
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Dan, Puppet builds a directed graph of resources based on the explicit relationships you create. There is no guarantee of consistent ordering for resources at the same level in the graph. Use the before and require that Ian suggests to explicitly specify the ordering relationship. Regards, Andrew Shafer Reductive Labs On Wed, Sep 24, 2008 at 8:52 AM, Dan Bode <bodepd@gmail.com> wrote:> > Hi, > > I have a best practices question. > > I have 3 classes that have to be run in a certain order. > > dhcp network must be run before nis which must be run before autofs. > > Originally, I was calling these functions from my workstation class, > and assuming that the include statements would be run in order. Then I > tried nesting the includes in the actual class (autofs includes nis, > etc.) > > Things are still not executing in the order that I wanted. > > Do I have to include things, then set requires to work between the two > objects? Is there something that I am missing. > > thanks, > > Dan > > >--~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---