Re: [Puppet Users] Variable Scoping: What do you want?

David Schmitt
2010-07-02T08:50:31Z

On 6/30/2010 10:57 AM, Matt wrote:
> On 29 June 2010 17:22, Luke Kanies<luke@puppetlabs.com>  wrote:
>> Hi all,
>>
>> Given the number of threads on variable scoping recently, it''s
pretty clear
>> we need to change how it works.  Markus has a lot of this redone in his
>> futures branch, and I''m asking him to fully describe what the
results will
>> be when that''s merged, but my guess is that there are
different expectations
>> for what people want to see.
>>
>> So, my question is, what behaviour changes would you like to see in how
>> variable scoping works?  How would you like the edge cases that are
>> currently hurting you to behave?
>>
>
> I''d like to see the ability to reference and change variables from
> other classes.
>
> class httpd { $monitor::services += ''httpd1'' }
> class nginx { $monitor::services += ''nginx'' }
>
> And if $monitor::services doesn''t exist then it''s just
created with
> one of the above rather than having to specify $monitor::services = []
>
> Or use the new staging feature for ordering where I could do:
>
> stage 1 includes class monitor { $monitor::services = [] }
> stage 2 includes class httpd, nginx as above

How is $monitor::service used, that this cannot read

   class httpd { monitor::service { ''httpd1'': } }
   class nginx { monitor::service { ''nginx'': } }

?


Best Regards, David
--
dasz.at OG              Tel: +43 (0)664 2602670     Web: http://dasz.at
Klosterneuburg                                         UID: ATU64260999

        FB-Nr.: FN 309285 g          FB-Gericht: LG Korneuburg