On Friday, August 23, 2013 7:32:57 PM UTC-5, Ygor wrote:
>
> Two problems:
>
> One: http://docs.puppetlabs.com/guides/parameterized_classes.html
>
> Your classes have no parameters.
>
>

This is not a problem.  Classes do not have to have parameters, and when 
they do not, they can omit the parentheses around the empty parameter 
list.  That syntax predates parameterized classes, in fact.

 

>
>
> Two: http://docs.puppetlabs.com/puppet/3/reference/lang_classes.html
>
> "Classes are named blocks of Puppet code, which are stored in modules for 
> later use and are not applied until they are invoked by name.”
>
> You are declaring your classes in your site manifest.
>
>


That is not a problem either.  It's perfectly valid to declare classes at 
top level.

There are two problems.  First, your class definitions should give their 
full names.  You seem to be trying to put them into a module (good for 
you), so their correct names would have the module name as a namespace 
prefix, for example:

#/etc/puppet/modules/morefangs/manifests/one.pp

class morefangs::one {
  file {'/tmp/one':
    ensure => present,
    content => 'moot',
  }
}
Then, when you declare the classes you specify their fully-qualified names:

include 'morefangs::one'
include 'morefangs::two'

(from anywhere).  That's what allows Puppet to find the .pp file wherein 
each class is defined, provided that the class it finds therein in fact 
bears requested name.

The clue here was Puppet's message, "Could not *find* class one" (emphasis 
added).  The code you posted was (all) valid, and not really so far off 
from what you wanted.


John

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to