Hi,

If you nest classes like that then you probably do have to dump
everything in init.pp

If however you split the classes and define each in a separate file
with the name <class>.pp in the manifests directory of the module, you
will be able to "include m_feature::specialized".

No problem with the inheritance - I do pretty much the same thing.


Bill

On Oct 15, 10:05 am, Felix Frank <felix.fr...@alumni.tu-berlin.de>
wrote:
> Hi,
>
> I'm transitioning a large-ish manifest from plain files with lots of
> import statements to modules.
> I used to heavily rely on a pattern like the following
>
> class feature {
>   ...
>   class specialized inherits feature {
>     ...
>     class more_special inherits specialized {
>       ...
>     }
>   }
>
> }
>
> So on a central location I can "include feature", but certain nodes will
> want to "include feature::specialized" and some even "include
> feature::specialized::more_special".
>
> For the modules transition, I see fit to prepend all classes with their
> module name, so if the module is named "m_feature", I'll substitute
> "include feature" with "include m_feature::feature", which works.
>
> What won't work are the nested classes (e.g. "include
> m_feature::feature::specialized").
>
> Is there a way I can maintain this naming scheme when using modules and
> autoloading? (I guess dumping everything in init.pp would work, but I'd
> prefer not to have to resort to that.)
>
> TIA,
> Felix

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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