[chef] Re: Setting an environment for a chef-solo run


Chronological Thread 
  • From: Nic Grayson < >
  • To: " " < >
  • Subject: [chef] Re: Setting an environment for a chef-solo run
  • Date: Tue, 10 Sep 2013 09:34:54 -0500

chef-solo doesn't use environments I use this to get around it.

environment = "vagrant"
environment = node.chef_environment if node.chef_environment != "_default"

Let me know if you have any questions.


On Tue, Sep 10, 2013 at 9:21 AM, Thomas Seliger < " target="_blank"> > wrote:
Hello,

I want to test a cookbook in Vagrant, using chef-solo for provisioning.
According to the Chef documentation chef-solo can use environments
(http://docs.opscode.com/chef_solo.html#environments).

How do I specify an environment, so that chef-solo will use it? The
documentation is not really clear on this. I want that
node.chef_environment returns 'stage' on the chef-solo run, but with
chef-solo node.chef_environment seems always to be '_default'.

Sorry if this is a FAQ but I did not find a usefull pointers/examples yet.

Best regards and thanks,
Tom




Archive powered by MHonArc 2.6.16.

§