Re: [Puppet Users] Can someone explain this structure?

Dan Bode
2010-01-14T13:54:44Z

On Thu, Jan 14, 2010 at 5:38 AM, SyRenity <stas.oskin@gmail.com> wrote:

> Hi.
>
> I found the following code example in Ohad''s great monit module:
> http://github.com/ohadlevy/puppet-monit/
>
> class mymodule::myclass {
>    include monit::common
> }
>
>
> Am I correct in my understanding, that it allows creating my own
> puppet module, which will include the monit module as well?
>

a module is just a way to organize manifests for autoloading (and some other
).

in the example, you are including the class monit::common. The reason that
you should be able to access the class is because it is stored in a module.

this involves creating your own puppet class(es) that should be stored in a
module.

the class is mymodule::myclass

is should be stored in

/etc/pupppet/modules/mymodule/manifests/myclass.pp

so that it is automatically available to other modules as mymodule::myclass.


http://reductivelabs.com/trac/puppet/wiki/PuppetModules

-Dan


(Just doing my first steps both in Puppet and Ruby here
altogether...)
>
> Thanks.
>
> --
> 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>
>
>