Guest User

Untitled

a guest
Jul 21st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. # ~/.chef/shef.rb
  2. begin
  3. # Load configuration from knife.rb
  4. require 'chef/knife'
  5. Chef::Knife.new.configure_chef
  6. rescue
  7. puts <<-EOF
  8. Can't load knife config: #{$!}
  9. This is probably nothing serious.
  10. EOF
  11. else
  12. # monkey-patch Shef to prevent it from setting Chef::Config[:solo] to true
  13. class Shef::StandAloneSession
  14. alias_method :rebuild_node_orig, :rebuild_node
  15. def rebuild_node
  16. rebuild_node_orig
  17. Chef::Config[:solo] = false
  18. end
  19. end
  20. end
Add Comment
Please, Sign In to add comment