28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/rake/remote_chef.rb', line 28
def self.load options = {}
options = {:config => options} if String === options
order = [:bootstrap, :core]
order += options.keys - order
recipes = {
:config => 'config/chef.rb',
:bootstrap => 'bootstrap/omnibus',
:core => 'core'
}.merge(options)
order.each do |flavor|
recipe = recipes[flavor]
next if recipe.nil? or flavor == :config
require "rake/remote_chef/#{recipe}"
end
set :ruby_path, '/opt/chef'
set(:rsync_flags) {['-rlptDzP', '--exclude', '.git', '-e', "ssh #{ssh_flags.join(' ')}"]}
Kernel.load recipes[:config]
Kernel.load "config/chef_#{ENV['to']}.rb" if ENV['to']
end
|