Created
October 14, 2010 15:30
-
-
Save jtimberman/626377 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "[email protected]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment