Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ~/.chef/shef.rb
- begin
- # Load configuration from knife.rb
- require 'chef/knife'
- Chef::Knife.new.configure_chef
- rescue
- puts <<-EOF
- Can't load knife config: #{$!}
- This is probably nothing serious.
- EOF
- else
- # monkey-patch Shef to prevent it from setting Chef::Config[:solo] to true
- class Shef::StandAloneSession
- alias_method :rebuild_node_orig, :rebuild_node
- def rebuild_node
- rebuild_node_orig
- Chef::Config[:solo] = false
- end
- end
- end
Add Comment
Please, Sign In to add comment