Hi Arnau,

Your module folder name is called 'common_puppet' but you're class is
called 'common_puppet_conf'.

Option 1, rename the common_puppet class to common_puppet_conf, as
according to your grep, the only class inside common_puppet/init.pp is
"class common_puppet_conf". The class definition in init.pp of a
module should match the name of the module itself so the auto loader
can find it.

Option 2, move the class declaration of common_puppet_conf out of
init.pp and into common_puppet_conf.pp in the same directory, then you
should be able to do this (note the use of the namespace
common_puppet, which is your module name):

include common_puppet::common_puppet_conf

You can then have a common_puppet class, which you can have install
Puppet software and start Puppet services. Depends on how you want to
organise your modules.

HTH,

-Luke

On Jan 13, 10:29 am, Arnau Bria <[email protected]> wrote:
> HI all,
>
> we've been explicity importing modules since we started working with puppet.
> We'd like to start using modules autoloading so I followed:
> p://docs.puppetlabs.com/guides/modules.html
>
> which only sys that puppet will load all modules under modulepath. Ok, so I
> have this modulepath:
>  modulepath =
> /etc/puppet/manifests/services/common/modules:/etc/puppet/manifests/services/workernode/modules/:/etc/puppet/manifests/services/tier_2/modules:
> ...
>
> (Yes, many module paths, but I see no limitation there)
>
> My default node includes common_puppet:
> node default {
>         include  common_puppet_conf
>
> }
>
> and the class is under:
>
> # ls /etc/puppet/manifests/services/common/modules
> common_bacula  common_defaults  common_puppet  common_snmpd  common_ssh
>
> # grep class
> /etc/puppet/manifests/services/common/modules/common_puppet/manifests/init.pp
>
> # No dependencies with other classes/modules. We need Linux and Solaris conf
> class common_puppet_conf {
>
> So, from my pointof view, puppet should autoload that class, but it doesn't:
>
> # puppetd --test --server ser01-test.pic.es
> err: Could not retrieve catalog: Could not find class common_puppet_conf at
> /etc/puppet/manifests/nodes.pp:8 on node tditaller019.pic.es
>
> Am I doing something wrong? Cause module autoload seem very easy and it's
> not working for me...
>
> TIA,
> Arnau

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to