Hello,

Am 29.09.2008 um 18:40 schrieb Marc Fournier:

> I have a bunch of variables that are used in several classes and
> definitions, all part of the same module.
>
> As these variables are defined automatically based on system facts, I
> would like to avoid having to declare them in each node that uses
> classes or definitions from my module.
>
> Where would be the best place to put these variables ? I tried in
> <module>/manifests/init.pp as well as in an external file imported  
> from
> within classes/definitions files but none work as I would have  
> expected.

That's a discussion I had several weeks ago on IRC, but I can't  
remember with whom. IIRC, it basically makes a difference wheter the  
module is autoloaded or imported. My tests so far have shown that  
"module-scope" variables, i.e. e.g. such ones defined at the beginning  
of init.pp, get included if you import the module, but not if some  
class in the module is autoloaded. I think we had concluded that it  
would be nice to have "module-scope" variables in autoloaded classes  
and definitions, but had not followed the thought or the tests any  
further.

I hope this answers some of your questions, and we can find a solution  
that suits everyone. Greetings,

Felix Schäfer
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to