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

Joe McDonagh
2010-06-29T23:47:07Z

On 06/29/2010 12:22 PM, Luke Kanies 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?
>
Since order is not guaranteed, re-defining is kind of a no-go, but maybe
some kind of ''final override'' keyword would work. Some logic
like "if
var is defined, i don''t care, this value takes final precedence."
But
you wouldn''t be able to have more than one ''final
override'' or whatever
term you want to call it.

Also, it would be *huge* to be able to append to vars. Right now I open
fw ports via a variable in the node def like:

$open_tcp_ports = "22,443"

If I could always open 22 in the node def, but += inside classes for
httpd, nfs, etc. things would be nice. I''m guessing this might be a
little difficult because all the variables in the  catalog would have to
be assembled before applying the catalog.

--
--
Joe McDonagh
Operations Engineer
AIM: YoosingYoonickz
IRC: joe-mac on freenode
"When the going gets weird, the weird turn pro."