Ask Your Question

How to run a script puppet with gepetto ?

asked 2013-11-28 04:06:31 -0600

AnthonyCr gravatar image

Hi, I'm new in puppet , and i use Gepetto. I have a script with an init.pp (who call another file), but when I run this script , gepetto say class: not found , import not found. But this script run in command line. I think it's a problem of modulpath but I find nothing about this on Internet.


edit retag flag offensive close merge delete


Can you show code - put it into a gist or pastie and link to it, and also what version of Geppetto and puppet are you using? When you run the ...(more)

llowder gravatar imagellowder ( 2013-12-10 10:40:32 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-07 17:42:59 -0600

Henrik Lindberg gravatar image

Geppetto does not actually run the puppet scripts - you do that from the command line, or if you like by adding a so called "External Command" to your Geppetto (basically a string that is what you would type on the command line, although you can use variables provided by Geppetto so you do not have to provide absolute paths etc). Any tutorial on Eclipse regarding External Commands can be followed.

What you are encountering is that the project you have in Geppetto is not configured correctly, probably in terms of laying out the .pp files the way they should be. Geppetto only looks in certain file locations for files. As an example It expects a class like mymodule::myclass to be located in the file locations where puppet expects code to be located relative to a module root, or to a environment root. There is a setting in Geppetto (search path) that tells geppetto which paths in each project it should parse and index. This index is automatically maintained by Geppetto and it is there that Geppetto expects to find classes when you use them.

If classes are in the same project you may need to correct their location in the project. Alternatively modify the search path.

If you are using multiple projects, where each project is its own module (say you are using stdlib). For this to work, the modules should have correct meta data or you will be notified that the referenced class is found "outside the search path".

edit flag offensive delete link more

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


Asked: 2013-11-28 04:06:31 -0600

Seen: 131 times

Last updated: Nov 28 '13