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
# Usage: ruby chef_solo_in_your_application.rb | |
require 'rubygems' | |
require 'chef' | |
Chef::Config[:solo] = true | |
Chef::Config[:file_cache_path] = '/path/to/chef-repo' | |
Chef::Config[:cookbook_path] = ['/path/to/chef-repo/cookbooks'] | |
@chef_solo = Chef::Client.new(JSON.load File.read ARGV.first) | |
@chef_solo.run |