title: Chef: Undefined node attribute or method `<<' on `node' when trying to add
body: <p>In my attributes file for postgresql recipe I have:</p>
  
  <pre class="lang-rb prettyprint-override"><code>default['postgresql']['pg_hba'] = {
      :comment =&gt; '# IPv4 local connections',
      :type =&gt; 'host',
      :db =&gt; 'all',
      :user =&gt; 'all',
      :addr =&gt; '127.0.0.1/32',
      :method =&gt; 'md5'
  }
  </code></pre>
  
  <p>I want to my recipe automatically add my servers to pg_hga config file like this:</p>
  
  <pre><code>lambda {
    if Chef::Config[:solo]
      return (Array.new.push node)
    end
    search(:node, "recipes:my_server AND chef_environment:#{node.chef_environment} ")
  }.call.each do |server_node|
    node['postgresql']['pg_hba'] &lt;&lt; {
        :comment =&gt; "# Enabling for #{server_node['ipaddress']}",
        :type =&gt; 'host',
        :db =&gt; 'all',
        :user =&gt; 'all',
        :addr =&gt; "#{server_node['ipaddress']}/32",
        :method =&gt; 'trust'
    }
  end
  
  include_recipe 'postgresql'
  </code></pre>
  
  <p>But I'm receiving an error:</p>
  
  <pre><code>NoMethodError
  -------------
  Undefined node attribute or method `&lt;&lt;' on `node'
  
  35:    node['postgresql']['pg_hba'] &lt;&lt; {
  36:        :comment =&gt; "# Enabling for #{server_node['ipaddress']}",
  37:        :type =&gt; 'host',
  38:        :db =&gt; 'all',
  39:        :user =&gt; 'all',
  40:        :addr =&gt; "#{server_node['ipaddress']}/32",
  41:        :method =&gt; 'trust'
  42&gt;&gt;   }
  43:  end
  44:  
  45:  include_recipe 'postgresql'
  </code></pre>