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


Chronological Thread 
  • From: Bryan Baugher < >
  • 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 11:51:46 -0500

I asked this question to Opscode support earlier. They mentioned trying to use LWRP or Definitions to apply a set of chef commands multiple times with different settings. This of course did not help 100%, as I was hoping to leverage already existing cookbooks and did not want to have to write my cookbook to do something multiple times.

Another option is to setup multiple "nodes" on your system. You can do this by running chef_client with the -N option for its name and -k for the client key. Then you can adjust the node specific attributes use knife node edit MY_NODE.

Bryan

On Tue, Oct 18, 2011 at 11: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.

Thanks in advance.
Tom

--
Tom Duckering




Archive powered by MHonArc 2.6.16.

§