[chef] Re: How Can I Run a recipe twice on the same machine with different settings for each invocation?


Chronological Thread 
  • From: Noah Kantrowitz < >
  • To:
  • Subject: [chef] Re: How Can I Run a recipe twice on the same machine with different settings for each invocation?
  • Date: Tue, 18 Oct 2011 09:43:32 -0700

On Oct 18, 2011, at 9:37 AM, Tom Duckering wrote:

> Hi,
> 
> I'm wondering if it's possible to apply a recipe twice on the same machine 
> with different settings.
> 
> The exact reason is that I have a build farm and each agent can only run a 
> single job at a time. I'd therefore like to install more than one agent on 
> each machine. Each agent needs slightly different settings so that they 
> don't clash.
> 
> So I'd like to say, run the agent recipe passing it a parameter to say 
> "agentId=1" and run it again with "agentId=2" and so on.

No, recipes cannot be instantiated more than once. Fortunately LWRPs can and 
are very easy to write if you already have a working recipe :-)

--Noah

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail




Archive powered by MHonArc 2.6.16.

§