Hey Fellows, What an interesting discussion. Have you guys ever seen Example42's Apache Module? http://www.example42.com/puppet/browsemodules.php
It is an an excellent model of what everyone is talking about. I always import my defines/ and classes subdirectories with the following in my module's init.pp: #apache class init.pp import "defines/*.pp" import "classes/*.pp" class apache { #stub code } The one caveat, is that your defines/ and classes/ subdirectories will have to have a "naked" .pp file in both directories, or puppet will error out. You could also comment out the imports, but it is up to your preference. I handle it by starting with a puppet_module SKEL directory, and it has a defines/BLANK.pp and a classes/BLANK.pp file in each subdirectory. Have a great July 5th! -Tom On Jul 5, 10:11 am, Thomas Bellman <bell...@nsc.liu.se> wrote: > On 2010-07-03, Jeff McCune wrote: > > > In this module, if you use the following orginization puppet will > > autoload everything: > > > manifests/init.pp contains class apache { } > > manifests/disable.pp contains class apache::disable inherits apache {} > > manifests/virtualhost.pp contains define apache::virtualhost(){} > > Yuck! Forcing each class or define into its own file sucks royally. > No sane person wants their code organized like that. > > > If you want additional namespaces, they go in directories. > > class apache::service::disable would go in manifests/service/disable.pp > > > I highly recommend against using import today and in the future. > > The cure is in this case worse, *much* worse, than the illness of having > to do explicit imports. I'd rather have two dozen import lines in site.pp > (which is what I have now) than having to split my classes and defines into > almost 200 files in two dozen directories. > > /Thomas Bellman -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.