[chef] Re: Lazy on template variables right syntax


Chronological Thread 
  • From: Tom Duffield < >
  • To:
  • Subject: [chef] Re: Lazy on template variables right syntax
  • Date: Thu, 6 Mar 2014 09:43:47 -0500

Did you try:

variables(lazy {{ :key => node['foo'], ...}})

??



On Thu, Mar 6, 2014 at 7:32 AM, aL. < " target="_blank"> > wrote:
Hi!!

What is the right syntax on themplates to use lazy with variables attribute? I have seen two ways:

variables lazy {{ :key =>node['foo'], ... }}

and

variables ( :key => lazy {node['bar'],.... )

I havent tested second one yet, but with the first one wich works, foodcritic says:

FC009: Resource attribute not recognised: ./recipes/default.rb:39

So what is the right way? On the docs, lazy is never mentioned within templates resource but generic way.
--
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.

§