On Tuesday, October 29, 2013 12:23:02 AM UTC-5, Daniel Sage wrote:
>
> Hi all,
>
> I'm currently experiencing an issue where a module cannot reference a 
> class from another module.
>
>

We'd be better able to diagnose the issue if you gave us the error message 
you receive, but my first guess is that you are not laying out your modules 
in the manner that enables the autoloader to find them.

 

> Currently, I've got two modules, workstation and nfs and I'm attempting to 
> use a class from the nfs module inside the workstation module, like so:
>
> Workstation module:
>
> class acme_inc::workstation {
>
> [...]
>
>     # install and set up the nfs client
>     class {'nfs':
>       class = "client",
>       domain = "acme.example.com",
>     }
> }
>
>

That class definition ought to appear in 
<module_path>/acme_inc/manifests/workstation.pp.
 

NFS Module:
>
> class nfs ($class = 'client', $domain = '') {
>
> [...]
> }
>
>

And that class definition ought to appear in 
<module_path>/nfs/manifests/init.pp.

See 
http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html#module-layout
 
for full details.


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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f1507038-46ee-4bf7-a8bc-e583c4aa361e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to