On Fri, Jun 15, 2012 at 2:53 AM, Sam <samuel.d.dar...@gmail.com> wrote:
> Noob question.    I read that init.pp should contain a class with the same
> name as the module itself.     However, the few modules on github that I
> have read so far seem to break this.    The module name will be like
> "our-super-version-of-nagios", and then init.pp will contain the class
> "nagios".     Which implies that the module was supposed to be called
> "nagios" actually.      So, does this mean that every time I want to use
> these modules I must be manually re-naming them?   That is extra work, isn't
> it.    Or you can call the class "nagios" , in spite of the module name
> being otherwise.    What is the most common usage case, given this scenario?
>     Or I have just had bad luck in the examples I have read so far, and they
> are wrong.

The module name should be the same as the class/define in init.pp. The
reason you see a prefix in github is due to the convention where it's
named {author}-{modulename}, puppet-{modulename}, or
puppetlabs-{modulename} so for example:

puppet-memcached [1] should be cloned into a module folder called memcached.
puppetlabs-openstack [2] should be cloned into a module folder called openstack.

It's just a small thing to remember when cloning repos.
git clone git://github.com/saz/puppet-memcached.git
/etc/puppet/modules/memcached

If you are new to puppet, I would check out the puppet module tool
available in 2.7.14+ (the gem isn't quite as awesome) which handles
changing the module name, finding dependencies, and installs them in
the correct place on your system. Check out one of our module of the
week in our blog post [3] which walks you through the install + usage,
and feel free to fork the module on github if you want to contribute
back.

Thanks,

Nan

1. https://github.com/saz/puppet-memcached
2. https://github.com/puppetlabs/puppetlabs-openstack
3. http://www.puppetlabs.com/blog/

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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