Take the 2-minute tour ×

I wanted to install splunkforwarder and none of the existing modules were working. So, I just decided to write it from scratch, except, fun story, I'm caught up at just installing the package.

So, I created a repository on my puppet master server. The repository works. If I do a yum install on my client, I'm able to install the splunkforwarder and it installed it properly under /opt. So, the repository to me is not the problem.

So, I just wanted the most basic of basic installs where there is no configuration.

class splunk2 {
         package { "splunkforwarder": ensure => "installed" }

This didn't work. There are no logs and the client doesn't throw an error -- nor does it mention installing it.

There are only two files; init.pp and up.pp

init.pp only contains;

class splunk2 {

Still the same issue. I just can't think of what's going wrong because it seems like this should be incredibly basic if I just want it to install the package.

Any ideas :(?

Edit: I did put in lololdolaol into the up.pp and puppet didn't complain. It's almost like it's ignoring this module.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Yes, Puppet is ignoring the module because it is not structured in a way the Puppetmaster's class autoloader accepts.

Starting from the beginning, where do your modules live? Probably in /etc/puppet/modules. So in there you have the following directory and file structure:


There are a few other directories in the module structure but these three are by far the most used and most important. The files and templates directories are optional while the manifests directory is mandatory if your module contains classes, or, more general, manifests. In there you put your classes. A file init.pp is also, in most cases, mandatory.

Your module directories and files now looks like this:


Your init.pp can contain all the magic:

class splunkforwarder {

  package { 'splunkforwarder':
    ensure => 'installed',


You have defined a class "splunkforwarder" which manages a single package of the same name. You can now do

include 'splunkforwarder'

in your node configuration and the splunkforwarder package should be installed on the next Puppet run.

share|improve this answer
Mine is set up like that. base.pp and init.pp are under /modules/splunk/manifests ... and when I do it your way I still get an error which claims error: could not retrieve catalog from remote server: error 400 on SERVER: could not find class splunk (I kept the name as splunk instead of splunkforwarder') for test.server.org on node test.server.org ... which, it's able to get my other modules I've written just fine. >_< –  Ethabelle Dec 5 '12 at 22:36
Do you use the module and class name "splunk" everywhere consistently? You probably have a typo or some inconsistency somewhere. I can't really say without more detailed information. What do the Puppetmaster logs say when you run the agent on the node? –  daff Dec 5 '12 at 22:44
Yeah, the only time it doesn't say splunk is when I tell it to install the package splunkforwarder. I mean, I have an aide module that I made and it works & drops in a .conf file into /etc/. So, this basically looks exactly like that the way I currently have it (changed it back). I checked for spelling errors on the 3 files and there are none. ~_~ Just keeps complaining about not being able to find the class, which is clearly named splunk in both the include and the name of the module and the name of the class in init.pp. –  Ethabelle Dec 5 '12 at 22:50
So, I had splunk and splunk2 in there. I had changed everything to splunk and it was throwing the error. I just did a rm -rf on splunk2 and it magically started working... even though splunk2 never references a class called splunk or attempted to call itself splunk. o_o .. Absurd. –  Ethabelle Dec 5 '12 at 22:55
Sounds strange, but there's probably a simple explanation. Can't say much without more information and logfiles though. –  daff Dec 5 '12 at 23:12

Your Answer


