The module standards page at
http://projects.puppetlabs.com/projects/puppet/wiki/Module_Standards
advises than when there are multiple classes in a module, you should
split them into separate files.

"Each (externally visible) define be in a separate file, named after
the class to facilitate autoloading. For groups of small and/or
tightly related defines, putting them together into a single file
might make sense. The module has to import that in the init.pp to
facilitate autoloading."

So, when I go and split the init.pp into seperate files in the
manifests directory, puppet doesn't automatically load them. What's
the best way to do this? I went and put and moved them to a classes
directory at the same level as the manifests directory (not sure why I
did this except I've seen others doing it. I'd rather leave it in
manifests), and put an import "classes/*.pp" at the top of init.pp.
Puppet then tells me:

Could not retrieve catalog from remote server: Error 400 on SERVER: No
file(s) found for import of 'classes/*.pp' at
/etc/puppet/modules/repo/manifests/init.pp:2 on node
log01.sjc.xxx.com.

However, the classes directory has files in it:

prov01 /etc/puppet/modules/repo/classes:# ls -l
total 8
-rw-r--r-- 1 puppet puppet 4538 Jul  1 16:22 repolist.pp

Doug.

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

Reply via email to