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.


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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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