[chef] Preserve value between definitions call?


Chronological Thread 
  • From: Denis Barishev < >
  • To:
  • Subject: [chef] Preserve value between definitions call?
  • Date: Fri, 31 May 2013 00:14:13 +0800

Hello chefs,

I was really surprised to find out that when the same definition is called one after one in the same recipe the recipe instance is different!
How is it possible? This messes up my understanding of chef again) The more I work with chef the more interesting moments I constantly find out)

I was trying to save a value as an instance variable of recipe, but it's occured that those were different recipe instances. So it seems like chef duplicates recipe instance when executing definition and probably resource. Is it true?

Do you see any clean ruby way to preserve a value between definition calls?

Thank you,
Denis Barishev



  • [chef] Preserve value between definitions call?, Denis Barishev, 05/30/2013

Archive powered by MHonArc 2.6.16.

§