summaryrefslogtreecommitdiff
path: root/lib/chef/client.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-12-05 14:22:19 -0800
committerJohn Keiser <jkeiser@opscode.com>2013-12-06 13:50:10 -0800
commit5e87b84187e8d341fc83bdc90f5a1ce25c871610 (patch)
tree4d79c77f2b8131db9b3b971b8522e5d4d09b07cb /lib/chef/client.rb
parentd85df00ffbedfa440ea529d96a8dc9245fbe44ed (diff)
downloadchef-5e87b84187e8d341fc83bdc90f5a1ce25c871610.tar.gz
Add ability to run recipes directly from chef-client command line
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r--lib/chef/client.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index 6a39395bb6..31def49a3d 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -146,6 +146,7 @@ class Chef
@events = EventDispatch::Dispatcher.new(*event_handlers)
@override_runlist = args.delete(:override_runlist)
+ @specific_recipes = args.delete(:specific_recipes)
runlist_override_sanity_check!
end
@@ -248,6 +249,11 @@ class Chef
run_status.run_context = run_context
run_context.load(@run_list_expansion)
+ if @specific_recipes
+ @specific_recipes.each do |recipe_file|
+ run_context.load_recipe_file(recipe_file)
+ end
+ end
assert_cookbook_path_not_empty(run_context)
run_context
end