[chef] Re: Library function in recipe


Chronological Thread 
  • From: Tim Green < >
  • To:
  • Subject: [chef] Re: Library function in recipe
  • Date: Wed, 8 Aug 2012 11:18:15 -0400

Yes, this is to be expected.  See the Chef wiki for further details:


Excerpt:

-Plain Ruby code outside of resources is evaluated, however.
-If you would like Ruby code executed with other resources, use a Ruby Block Resource.

For further details on postponing execution of arbitrary Ruby code until convergence, see here:


-Tim


Tim Green
Field Solutions Architect | Opscode, Inc.
Direct: 718-517-7969
Cell: 860-287-4653

Twitter - @tim_ops
http://www.opscode.com/

On Wednesday, August 8, 2012 at 10:59 AM, wrote:

I have a custom library in a cookbook. It is included in several recipes and
the library function is invoked several times. It appears that all the function
calls are processed during the compile phase of the chef run. Is this expected?
I want it to be invoked during the execution phase. Is this possible?

Note: The library function posts messages to a queue using stomp.




Archive powered by MHonArc 2.6.16.

§