Ask Your Question
1

puppet module generate, then apply, cannot find class

asked 2014-08-01 00:30:52 -0500

JM gravatar image

This should be easy, right?

Using the puppetlabs centos-6.5-64-puppet box:

  • puppet config print modulepath, returns '/home/vagrant/.puppet/modules:/usr/share/puppet/modules'
  • cd /usr/share/puppet/modules
  • puppet module generate my-project
  • hit enter through all the defaults
  • puppet apply -e 'include project', returns Error: Could not find class project for localhost on node localhost Error: Could not find class project for localhost on node localhost

I'm a little shocked that right out of the box, none of this works. Am I doing something wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
-1

answered 2014-08-01 21:22:11 -0500

lavaman gravatar image

You would have to include my-project, not project.

edit flag offensive delete link more

Comments

No, the include is correct, as 'my' is the author and 'project' is the module name, just as in 'puppetlabs-apt' which you include as 'include apt'.

Arney gravatar imageArney ( 2015-12-15 15:57:34 -0500 )edit

The naming of modules from generate is based on the github repo naming model. Puppet cannot find a class called project in a directory called my-project. It would only be able to find a class named my-project. When you install modules on a master they must be in a directory name that matches.

lavaman gravatar imagelavaman ( 2015-12-15 17:30:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-08-01 00:30:52 -0500

Seen: 1,884 times

Last updated: Aug 01 '14