Method: Chef::Node#apply_expansion_attributes
- Defined in:
- lib/chef/node.rb
#apply_expansion_attributes(expansion) ⇒ Object
Apply the default and overrides attributes from the expansion passed in, which came from roles.
503 504 505 506 507 508 509 510 511 512 513 514 515 |
# File 'lib/chef/node.rb', line 503 def apply_expansion_attributes(expansion) loaded_environment = if chef_environment == "_default" Chef::Environment.new.tap { |e| e.name("_default") } else Chef::Environment.load(chef_environment) end attributes.env_default = loaded_environment.default_attributes attributes.env_override = loaded_environment.override_attributes attribute.role_default = expansion.default_attrs attributes.role_override = expansion.override_attrs end |