[chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: any plan for partial templates in Chef?


Chronological Thread 
  • From: Peter Norton < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: any plan for partial templates in Chef?
  • Date: Thu, 15 Nov 2012 12:17:07 -0500

If using a partial can cause shadowing then some namespacing should come into play in case e.g. node and node-prime with modified values are both passed in.


-Peter


On Nov 15, 2012 2:17 AM, "Bryan Berry" < " target="_blank" style="color:rgb(17,85,204)"> > wrote:
My colleague raised another interesting points:

* do we want to propagate all variables from the template resource down to every partial?
My guess is yes—I can't really imagine a use case where you want to hide some from a partial. Overwrite it with a different value yes, but not block it. Right?

* I have never tried, but I assume it's possible to assign a value to these variables in a template.
We need to ensure that setting a variable in a partial does *not* propagate up the chain.
In other words, I need to #dup the context before sending it to a partial.


big yes on both points for me!

On Thu, Nov 15, 2012 at 9:49 AM, Peter Norton < " target="_blank"> > wrote:

If using a partial can cause shadowing then some namespacing should come into play in case e.g. node and node-prine with modified values are both passed in.

On Nov 15, 2012 2:17 AM, "Bryan Berry" < " target="_blank"> > wrote:
My colleague raised another interesting points:

* do we want to propagate all variables from the template resource down to every partial?
My guess is yes—I can't really imagine a use case where you want to hide some from a partial. Overwrite it with a different value yes, but not block it. Right?

* I have never tried, but I assume it's possible to assign a value to these variables in a template.
We need to ensure that setting a variable in a partial does *not* propagate up the chain.
In other words, I need to #dup the context before sending it to a partial.


big yes on both points for me!




Archive powered by MHonArc 2.6.16.

§