Created
April 30, 2012 06:17
-
-
Save tily/2555908 to your computer and use it in GitHub Desktop.
自分のアプリケーションから Chef Solo を呼び出す
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment