我已经inheritance了一个包含include语句的模块
include '::module::config'
但在编辑了一些似乎是不相关的东西之后,这已经不起作用了,傀儡抱怨说:
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
除非我将其更改为:
include 'module::config'
然后它再次开始工作。
在开始时使用::
指定顶级作用域。
如果你的课程是以正常的方式组织的,那么这应该不会有问题。 如果你有名称冲突的课程,这很重要; 例如,如果你在module::stuff
和一个名为stuff
的模块中有一个类,那么从module::things
包含module::things
将包括module::stuff
而不是stuff
。
所以,使用include ::stuff
是一个解决方法,告诉查找你想要的顶级范围。 这个解决方法在这里被logging。
所以..看看你的模块结构,看看module::config
是你所包含的模块的子模块。 如果没有,那么其他的东西就是造成这个问题。 你能否提供更多关于你所做的更改的信息?