On 01/10/2015 02:39 PM, Christopher Wood wrote:
> On Fri, Jan 09, 2015 at 01:51:28PM -0800, Drew wrote:
>> >    I'm fooling around with some defined types and am struggling a little.
>> >     The following is just a small example of what I'm doing while I work it
>> >    out:
>> >    #/etc/puppet/modules/testmodule/manifests/init.pp
>> >    define testmodule ( $message ){
>> >      testmodule::down { "${name}":
>> >         message => "test message for ${name}",
>> >      }
>> >    }
> I think init.pp has to contain only the class with the same name as the 
> module.

Kind of like that, but backwards :-)

The class 'testmodule' must reside in init.pp. Any class or define *can*
be put there and the autoloader will find it all right. But it is better
practice to put everything in their own respective files.

The issue here is likely that the OP tries to `include testmodule` even
though there is no such class. Just get rid of this include statement -
instantiating your define will Just Work.

HTH,
Felix

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/54B30B40.5010309%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to