Advertisement
miketheman

chef: node attributes returning nil

Aug 29th, 2012
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.01 KB | None | 0 0
  1. chef:attributes > node[:test2] = {"name" => "value"}
  2.  => {"name"=>"value"}
  3. chef:attributes > node[:test2].class
  4.   => Chef::Node::Attribute
  5. chef:attributes > node[:test_value2] = node[:test2]
  6.  => #<Chef::Node::Attribute @current_automatic=nil, @default={...}, @set_unless_value_present=false, @current_override=nil, @auto_vivifiy_on_read=false, @automatic={...}, @override={...}, @current_default=nil, @has_been_read=false, @current_nesting_level=[:test2], @normal={...}, @current_normal={"name"=>"value"}, @set_type=nil>
  7. chef:attributes > node[:test_value2].inspect
  8.  => "#<Chef::Node::Attribute @current_automatic=nil, @default={...}, @set_unless_value_present=false, @current_override=nil, @auto_vivifiy_on_read=false, @automatic={...}, @override={...}, @current_default=nil, @has_been_read=false, @current_nesting_level=[:test_value2], @normal={...}, @current_normal=#<Chef::Node::Attribute @current_automatic=nil, @default={...}, @set_unless_value_present=false, @current_override=nil, @auto_vivifiy_on_read=false, @automatic={...}, @override={...}, @current_default=nil, @has_been_read=false, @current_nesting_level=[:test2], @normal={...}, @current_normal={\"name\"=>\"value\"}, @set_type=nil>, @set_type=nil>"
  9. chef:attributes > node[:test_value2]['name']
  10.  => "value"
  11. chef:attributes > node[:test_value2]['name']
  12.  => nil
  13. chef:attributes > node[:test_value2].inspect
  14.   => "#<Chef::Node::Attribute @current_automatic=nil, @default={...}, @set_unless_value_present=false, @current_override=nil, @auto_vivifiy_on_read=false, @automatic={...}, @override={...}, @current_default=nil, @has_been_read=false, @current_nesting_level=[:test_value2], @normal={...}, @current_normal=#<Chef::Node::Attribute @current_automatic=nil, @default={...}, @set_unless_value_present=false, @current_override=nil, @auto_vivifiy_on_read=false, @automatic={...}, @override={...}, @current_default=nil, @has_been_read=true, @current_nesting_level=[:test2, \"name\", \"name\"], @normal={...}, @current_normal={\"name\"=>\"value\"}, @set_type=nil>, @set_type=nil>"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement