Skip to content

Instantly share code, notes, and snippets.

View mokemokechicken's full-sized avatar

Ken Morishita mokemokechicken

View GitHub Profile
@tily
tily / chef_solo_in_your_application.rb
Created April 30, 2012 06:17
自分のアプリケーションから Chef Solo を呼び出す
# 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