summaryrefslogtreecommitdiff
path: root/lib/chef/run_context.rb
diff options
context:
space:
mode:
authorRichard Manyanza <rm@dsc.co.tz>2014-03-17 21:49:04 +0300
committerLamont Granquist <lamont@scriptkiddie.org>2014-10-22 14:22:09 -0700
commitcb1bcb1f08816f551f96e713624718f58da3c9b3 (patch)
tree93458a3b13ea008f596249aa7ae8b1975bd0c1f9 /lib/chef/run_context.rb
parent4db0ef42910d03209c7bb4b69f14e565c8c758ae (diff)
downloadchef-cb1bcb1f08816f551f96e713624718f58da3c9b3.tar.gz
Initial sketch for provider resolver
Diffstat (limited to 'lib/chef/run_context.rb')
-rw-r--r--lib/chef/run_context.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/run_context.rb b/lib/chef/run_context.rb
index bbe2f9eba0..3564be62ff 100644
--- a/lib/chef/run_context.rb
+++ b/lib/chef/run_context.rb
@@ -18,6 +18,7 @@
# limitations under the License.
require 'chef/resource_collection'
+require 'chef/provider_resolver'
require 'chef/cookbook_version'
require 'chef/node'
require 'chef/role'
@@ -50,6 +51,8 @@ class Chef
# recipes, which is triggered by #load. (See also: CookbookCompiler)
attr_accessor :resource_collection
+ attr_reader :provider_resolver
+
# A Hash containing the immediate notifications triggered by resources
# during the converge phase of the chef run.
attr_accessor :immediate_notification_collection
@@ -82,8 +85,8 @@ class Chef
@reboot_info = {}
@node.run_context = self
-
@cookbook_compiler = nil
+ @provider_resolver = Chef::ProviderResolver.new(@node)
end
# Triggers the compile phase of the chef run. Implemented by
@@ -91,6 +94,7 @@ class Chef
def load(run_list_expansion)
@cookbook_compiler = CookbookCompiler.new(self, run_list_expansion, events)
@cookbook_compiler.compile
+ @provider_resolver.load
end
# Adds an immediate notification to the