include manifests/*.pp
in your site.pp, but real answer to follow the module convention:
http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html
I'm a first time user that just installed Puppet 3.1.0 over the weekend and hit a road block that I can't seem to get across. I have a Linux master (Mageia 2) and two Windows 7 clients. I was able to get basic recipes working by putting the resources directly in the node definitions. Now I'm trying to move to the next step and start using classes. I am *not* using modules, yet.
From the docs, it appeared that that is Ok.
However, no matter what I've attempted, the Puppet Master is not able to find the class definition. I started out having my classes in separate .pp files, but I'm currently just trying to define them in init.pp.
Here's my current simple example that is failing:init.ppclass blahwin {file { 'harris2.txt':path => 'c:/temp/harris2.txt',ensure => file,}}class blah {file { 'harris3.txt':path => '/tmp/harris3.txt',ensure => file,}}
site.pp
}node 'nfs-desktop' inherits base {include blahwin
}node 'nfs-desktop.example.com' inherits nfs-desktop {file { 'harris.txt':path => 'c:/temp/harris.txt',ensure => file,}}
Currently, I'm using the inheritance approach since someone on stack overflow mentioned it helped having the FQDN node inherit from the host name. For me it made no difference. I have applied those .pp files. magic.example.com is the puppet master.
Before I added "include blah" to the master node definition, here is the output I get when I run the agent on the nfs-desktop:C:\Program Files (x86)\Puppet Labs\Puppet\bin>puppet agent --test --verboseError: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class blahwin for nfs-desktop.example.com on node nfs-desktop.example.comWarning: Not using cache on failed catalogError: Could not retrieve catalog; skipping run
Now that "include blah" is part of the master definition, here is what I get when I try to run "sudo puppet apply site.pp" on the master:[josh@magic] /etc/puppet/manifests > puppet apply site.ppNOTE: Gem.latest_load_paths is deprecated with no replacement. It will be removed on or after 2011-10-01.Gem.latest_load_paths called from /usr/lib/ruby/site_ruby/1.8/puppet/util/rubygems.rb:54.Error: Could not find class blah for magic.example.com on node magic.example.comError: Could not find class blah for magic.example.com on node magic.example.com
The simple answer is to putinclude manifests/*.pp
in your site.pp