Sha256: 3cb14c0ae85b381f1920dc8ae7225fea5f77e7e10d6f29cc74bce36de391a025
Contents?: true
Size: 984 Bytes
Versions: 2
Compression:
Stored size: 984 Bytes
Contents
namespace :bootstrap do desc "Create a standalone rbenv installation with a default ruby to use with chef-solo" task :ruby do local_rvs = ruby_version_switcher rescue 'rvm' local_env = rails_env rescue 'unknown' case local_rvs when 'rbenv' set :ruby_version_switcher, "rbenv" set :rbenv_bin_path, "/tmp/.chef_cap_rbenv_path" set :exec_chef_solo, "`cat #{rbenv_bin_path}` exec chef-solo -c /tmp/chef-cap-solo-#{local_env}.rb #{debug_flag}" else ## rvm is the default set :ruby_version_switcher, "rvm" set :rvm_bin_path, "/tmp/.chef_cap_rvm_path" set :exec_chef_solo, "`cat #{rvm_bin_path}` default exec chef-solo -c /tmp/chef-cap-solo-#{local_env}.rb #{debug_flag}" end set :default_environment, { 'PATH' => "$PATH:/usr/sbin" } depend :remote, :command, ruby_version_switcher depend :remote, :command, "chef-solo" after "bootstrap:ruby", "bootstrap:#{ruby_version_switcher}" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
chef_cap-0.3.23 | recipes/ruby.rb |
chef_cap-0.3.22 | recipes/ruby.rb |