I created a module named 'learn-tomcat' and it has a class named tomcat (in init.pp). When I try to include this class in a node definition, it does not work, all of following combination throw an error, the combinations are:
include learn-tomcat::tomcat
include learn-tomcat
include tomcat
include ::tomcat
And error is same with above combinations:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class
Now when I rename module directory learn-tomcat to tomcat, then following start working!
include tomcat
include ::tomcat
include tomcat::tomcat
Now I am confused about a few things:
- Although Puppet enforces the name of module to be USERNAME-MODULENAME while creating - should one rename it after creation?
- I could not find relevant documentation but what exactly is happening here?