2008/9/16 Digant C Kasundra <[EMAIL PROTECTED]>:
>
> Hello everyone,
>
> My team and I have been mulling over the module standards that were proposed 
> (http://www.reductivelabs.com/trac/puppet/wiki/ModuleStandards)
>
> Members of our team like to break large classes up into tiny pieces, which 
> isn't covered in this doc.  For instance, if a class declares 10 files and 12 
> packages and 5 services, there is a preference to break these into 
> foo::files, foo::packages, and foo:services and then have foo include these 
> things.  My problem with this is that I like to preserve a clear 
> representation that :: denotes that the thing following is a subclass of the 
> thing proceeding (so ssh::server means this is a subclass of ssh, relating 
> specifically to ssh).
>
> So my proposal is if there is need or want to break up large classes, the 
> fragment class (i.e. foo::files) be named specifically in a way that makes it 
> clear it is not a complete and functional class but only a fragment.  Such a 
> naming convention might call for something like foo::_files or 
> foo::inc::files.  I would like to open this topic up to discussion to the 
> greater community (you guys) and see what you think.
>

I guess I could see this if the classes were scattered throughout /manifests/.
I approach module building the same way in terms of breaking the classes
into smaller pieces.  I guess I don't see a specific need for a
fragment designation.
I usually create a class named "foo" in init.pp and include the sub
classes there:

class files {
     # include files class groups
     include files::all
     include files::rhel5
     # include files class hosts
     include files::host1
}

In site.pp I just "include foo."  I document all this in the README
and comment the init.pp file.  It just seems natural to me that way.
My setup isn't probably as complex as some so maybe I'm missing
something......
Kent

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