summaryrefslogtreecommitdiff
path: root/lib/chef/node.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2017-04-05 11:49:51 +0100
committerThom May <thom@chef.io>2017-04-05 18:17:38 +0100
commit5c86ade466a38536186218009e32bb4db1ab3c92 (patch)
treed6e93d25ab4736a9d6f3c338971c56302c3f7708 /lib/chef/node.rb
parenta9d0cfb3bcb995d60e096a755e4e58fa47f40047 (diff)
downloadchef-5c86ade466a38536186218009e32bb4db1ab3c92.tar.gz
RFC 59: Load Ohai pluginstm/ohai_plugins_2
This adds a new phase in the compilation of the run context. Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef/node.rb')
-rw-r--r--lib/chef/node.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/node.rb b/lib/chef/node.rb
index 92bdb5887b..549bde0dbb 100644
--- a/lib/chef/node.rb
+++ b/lib/chef/node.rb
@@ -338,6 +338,10 @@ class Chef
automatic[:platform_version] = version
end
+ def consume_ohai_data(ohai_data)
+ self.automatic_attrs = Chef::Mixin::DeepMerge.merge(automatic_attrs, ohai_data)
+ end
+
# Consumes the combined run_list and other attributes in +attrs+
def consume_attributes(attrs)
normal_attrs_to_merge = consume_run_list(attrs)