[chef] Re: Re: Re: Re: Re: Re: Re: Re: Force recipe to run at the end


Chronological Thread 
  • From: Julien Vehent < >
  • To: < >
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Re: Re: Force recipe to run at the end
  • Date: Mon, 01 Oct 2012 23:07:40 -0400

On 2012-10-01 21:39, AJ Christensen wrote:
For structured code like this (requires, includes, extends.. code that
spreads multiple files..) I'd suggest moving it out to a Ruby Gem and
using the chef_gem installation method / compile time access.

As Jay mentioned, the libraries are shipped from the server and
evaluated as they are received (IIRC) so you can have potential
ordering issues there when requiring a file that doesn't exist, or
relying on a file to be autoloaded, etc.

Here's an additional example:

http://rubygems.org/gems/flock_of_chefs
https://github.com/chrisroberts/flock_of_chefs/

https://github.com/chrisroberts/cookbook-flock_of_chefs/blob/master/recipes/default.rb

Cheers,

--AJ


Thanks for the explanation, AJ.
I decided to take a simpler approach and store the exported function in the same module as the internal function. It works fine, and does what I want.
https://github.com/jvehent/AFW/commit/2117d19d64c568985eae5a855c11e42167d2e41e

Cheers,
Julien





Archive powered by MHonArc 2.6.16.

§