On Thursday, October 25, 2012 3:33:16 PM UTC-5, danielt wrote:

Puppet expects to find a definition with this name:


> helper::files{
>

 
in this file:

[...] modules/helper/manifests/files.pp
>
>
 

> [...] I usually had the install define within the class. But puppet-lint 
> didn't like this so I thought outsourcing it to its own module would work 
> out. 
>


I'm not sure what you mean about putting the define in its own module, but 
doing so (correctly) without changing its name would have put it exactly 
where Puppet was looking for it.  Some people try to use "module" as a 
synonym for "file", but Puppet "modules" are structured collections of 
files containing class, resource, and data definitions, and arranged 
according to a standard directory structure.

The definition doesn't need to be in its own module, but it should be in 
its own *file* within the module (which is what puppet-lint was telling 
you), and it should identify itself by its fully-qualified name.  Anyone 
outside the module must reference it by that fully-qualified name.  Classes 
and resources in the same module ought to be able to reference it by its 
name relative to the module, but they *should* reference it by its 
fully-qualified name, too.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/nDpeoYEXupkJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to