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.pp*
class 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 'base' {
}
node 'magic.example.com' inherits base {
include blah
}
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 --verbose
Error: 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.com
Warning: Not using cache on failed catalog
Error: 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:
[[email protected]] /etc/puppet/manifests > puppet apply site.pp
NOTE: 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.com
Error: Could not find class blah for magic.example.com on node
magic.example.com
So even attempting to use the class on the master is problematic. At one
point I did have the classes in unique .pp files, but moved them into
init.pp after hitting this very error. Any help is appreciated.
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.