[Puppet Users] Re: When do modules get auto-imported

Eric Snow
Thu, 11 Nov 2010 17:27:33 -0000

Thanks for the feedback.

My understanding is that when you have an init.pp with import "*" in
it, it will be able to find the rest of the manifests in the module.
However, I was operating under the assumption that all the modules in
the environment get auto-imported at the beginning of the run
(otherwise how are top-level includes found).

So is there no way then to have several manifests with their own
namespaces bound together in the same module?  The alternative
(splitting them into their own modules) makes my maintenance duties
that much messier.  Thanks.

-eric

On Nov 11, 9:52 am, "R.I.Pienaar" <r...@devco.net>
wrote:
> ----- "Eric Snow" <es...@verio.net> wrote:
>
> > On the puppetmaster:
>
> > info: Caching node for <HOSTNAME>
> > info: Could not find class hosttypes::unassigned for <HOSTNAME>
> > notice: Compiled catalog for d<HOSTNAME> in 0.01 seconds
> > info: Caching catalog for <HOSTNAME>
>
> ok, disregard previous mail.
>
> if you''re including hosttypes::unassigned
>
> you need to put the file in either:
>
> modulepath/hosttypes/manifests/init.pp or
modulepath/hosttypes/manifests/unassigned.pp
>
> you cant just put them in any files, it has to know where to find them.
>
>
>
>
>
>
>
> > > settings
> > > |-- all
> > >     |-- manifests
> > >         |-- init.pp
> > >         |-- hosttypes.pp
>
> > > -- node (in development) --
>
> > > node test {
> > >     include hosttypes::unassigned
>
> > > }
>
> > > -- init.pp --
>
> > > import "*"
>
> > > -- hosttypes.pp --
>
> > > class hosttypes::unassigned {
> > >     notify {"hosttypes::unassigned ": }
> > >     notice("hosttypes::unassigned ")
> > >     service {"httpd":
> > >         enable => false,
> > >         ensure => stopped,