[chef] Re: Re: tow to tell if chef-solo or hosted chef


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: Re: tow to tell if chef-solo or hosted chef
  • Date: Thu, 11 Jul 2013 11:14:21 -0700

if Chef::Config[:chef_server_url].nil?
  # solo baby
elsif URI.parse(Chef::Config[:chef_server_url]).host == 'api.opscode.com'
 # im hosted
else
#  private or foss
end


On Thu, Jul 11, 2013 at 10:59 AM, Andrew Gross < " target="_blank"> > wrote:
Chef::Config[:solo] <- Boolean


On Thu, Jul 11, 2013 at 1:51 PM, David Montgomery < " target="_blank"> > wrote:

Hi,

How can I tell from a recipe if using chef-solo or hosted chef?

Is there an env variable somewhere?

Thanks





Archive powered by MHonArc 2.6.16.

§