[chef] Re: Re: 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: Re: Re: any plan for partial templates in Chef?
  • Date: Thu, 15 Nov 2012 13:58:58 -0500

So if a user has a working template, then wants a partial that could work with it (and I can see partials being mixed in - am I right about that?) then by using the partial they could break their configuration.  This just gets sticky and it'd be nice to have a namespace that means "the port list supplied to the template always", "the port list supplied to a partial, always" and "what a mashup of the layers turns up, always", and "a way to see what the mashup was made from".

-Peter

On Thu, Nov 15, 2012 at 12:21 PM, Daniel DeLeo < " target="_blank"> > wrote:

On Thursday, November 15, 2012 at 9:17 AM, Peter Norton wrote:

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

I'd rather leave this up to the user. For example, if you have a template

template "/path"
  variables :ports => [8000, 8080]
end

And a partial:

render "my_partial", :variables => {:ports => [4000]}

Then I think you specified your intent, and chef should respect it.

-- 
Daniel DeLeo





Archive powered by MHonArc 2.6.16.

§