Hi,

On 04/22/2011 06:48 PM, Tony G. wrote:
> Hi all,
> 
> Found a situation on which all classes inside a directory are ignored,
> this when the directory name is the same as a module name.
> 
> err: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Could not find class bar at
> /opt/puppet/test/nodes/gnucloud.tonyskapunk.net.pp:2 on node
> gnucloud.tonyskapunk.net <http://gnucloud.tonyskapunk.net>
> 
> Basically I have on site.pp an import of multiple classes inside a
> directory with import "foo/*" and also a module called "foo"

this is a strange requirement indeed. Can you shed any light on why you
want such a structure? It sounds undesirable, even though it should
still work.

> Running debug on the master I see only the module is imported, this
> looks like a ruby thing, but since I'm not good at ruby I better ask,
> why is being ignored?
> 
> debug: importing '/opt/puppet/test/modules/foo/manifests/init.pp' in
> environment test
> 
> Details:
> Server/Client: 2.6.7
> Node has: import bar
> bar is a class inside "foo" directory that is imported in site.pp

This should be "include bar" then.

Import is a feature that should be considered deprecated.
Try and organize everything into modules and exploit the autoloader,
i.e. make another module "foo_module" with all the classes currently in
disorganized .pp-files in your manifests/foo/ directory and only do

include foo_module::bar

without any import statements. There is less pain (and better
performance I feel) down that road.

Regards,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
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