[chef] Re: guards for include_recipe


Chronological Thread 
  • From: " " < >
  • To:
  • Subject: [chef] Re: guards for include_recipe
  • Date: Thu, 16 Oct 2014 07:17:31 -0700 (PDT)

One option would be to convert your recipe into an LWRP.


Sent from Mailbox


On Thu, Oct 16, 2014 at 7:15 AM, Tom Duffield < " target="_blank"> > wrote:

One option would be to convert your recipe into an LWRP. 


Sent from Mailbox


On Thu, Oct 16, 2014 at 12:21 AM, < "> > wrote:

I've got a recipe where I try to download a .deb file but don't know if the
file really exists on the other side.
If the file is not present I have to build the package from scratch.

I've got a recipe which handles the build itself but I'm unable to include/not
include it based on the result of the download attempt.

I can't use File.exists?() because this is evaluated at compile time and there
the file is not present. For resources I can use guards, but these are not
supported for include_recipe.

How would I handle this scenario and avoid wrapping the build in a bash script
or add my guard to every resource in the build recipe!?





  • [chef] Re: guards for include_recipe, , 10/16/2014

Archive powered by MHonArc 2.6.16.

§