Skip to content

Instantly share code, notes, and snippets.

@jtimberman
Created October 14, 2010 15:30
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtimberman/626377 to your computer and use it in GitHub Desktop.
Save jtimberman/626377 to your computer and use it in GitHub Desktop.
current_dir = File.dirname(__FILE__)
platform = "https://api.opscode.com/organizations"
require 'grit'
branch = Grit::Repo.new("#{current_dir}/..").head.name
case branch
when "internal"
url = "http://virt1test.int.example.org:4000"
validator = ""
client_internal = "-internal"
when "master"
orgname = "example"
validator = "#{orgname}-"
url = "#{platform}/#{orgname}"
when "joshtest"
orgname = "joshtest"
validator = "#{orgname}-"
url = "#{platform}/#{orgname}"
else
orgname = "housepub"
validator = "#{orgname}-"
url = "#{platform}/#{orgname}"
end
validation_key "#{current_dir}/#{validator}validator.pem"
chef_server_url url
log_level :info
log_location STDOUT
node_name ENV["USER"]
client_key "#{current_dir}/#{ENV['USER']}#{client_internal}.pem"
validation_client_name "#{validator}validator"
cache_type 'BasicFile'
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
cookbook_path ["#{current_dir}/../cookbooks"]
cookbook_copyright "Opscode, Inc."
cookbook_license "apachev2"
cookbook_email "cookbooks@opscode.com"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment