[chef] Re: [Template] - variables vs direct attribute access


Chronological Thread 
  • From: Ranjib Dey < >
  • To: " " < >
  • Subject: [chef] Re: [Template] - variables vs direct attribute access
  • Date: Fri, 31 Oct 2014 08:32:15 -0700

you dont need lazy variable unless you have very specific requirements (like the value of that variable depends on another computed attribute at compile time) . 
Both style allows nil value, and can be a failure point and there are several ways to address that, like chefspec assertion etc. There's an RFC on template verification attribute (like guards) which might help in this.

regards
ranjib

On Fri, Oct 31, 2014 at 4:49 AM, aL. < " target="_blank"> > wrote:
Ohai chefs!

I just having a talk with a team member about why or why not use "variables" with lazy or not on template resources.

I dont know what is the right way or the "bad practice" way of doing this. Because if you can access attributes directly inside the template, and attributes are compiled an resolved on compile time. ¿Why are you going to want to use variables params on templates?

Could be that varibles were just another fail point on the chain, right?

Thanks a lot!!!
--
Si necesitas una máquina para hacer algo y no la compras al final te darás cuenta de que has pagado lo mismo y no tienes la máquina.--Henry Ford
Alberto




Archive powered by MHonArc 2.6.16.

§