我创建了一个名为“learn-tomcat”的模块,它有一个名为 tomcat 的类(在 init.pp 中)。当我尝试将此类包含在节点定义中时,它不起作用,以下所有组合都会引发错误,组合是:
include learn-tomcat::tomcat
include learn-tomcat
include tomcat
include ::tomcat
并且错误与上述组合相同:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class
现在,当我将模块目录 learn-tomcat 重命名为 tomcat,然后开始工作!
include tomcat
include ::tomcat
include tomcat::tomcat
现在我对一些事情感到困惑:
- 尽管 Puppet 在创建时强制模块的名称为 USERNAME-MODULENAME - 创建后是否应该重命名它?
- 我找不到相关文档,但这里到底发生了什么?