Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have inherited a module that contains the include statement

include '::module::config'

but after editing a few things that seems to be unrelated, this doesn't work anymore and puppet complains that:

    err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
    Puppet::Parser::AST::Resource failed with error ArgumentError: Could not 
    find declared class ::module::config at /home/user/svn-workspace/puppet
    /user/modules /module/init.pp:28 on node host.acme.com

unless I change it to:

include 'module::config'

then it starts working again.

share|improve this question
add comment

1 Answer 1

Using :: at the start specifies top scope.

If your classes are structured in a normal way, this should never matter. It can matter if you have classes with name collisions; for instance, if you have a class at module::stuff and a module named stuff, then an include stuff from within module::things will include module::stuff instead of stuff.

So, using include ::stuff is a workaround for that, telling the lookup that you want top scope. This workaround is documented here.


So.. take a look at your module structure and see if module::config is a sub-module of the module you're including from. If not, then something else is causing the problem; can you provide more information about what changes you made?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.