title: Puppet: nested hash/dict,array: how to access in erb?
body: <p>playing with puppet, I have ended up in a nested dictionary/hash - which looks more or less like</p>
  
  <pre><code>$settings =
  {
    "var1" =&gt; 
    {
      "ip" =&gt; "0.0.0.0",
      "port" =&gt; "1234",
      "option" =&gt; ["foo", "bar"],
      "machines" =&gt;
      {
        "maschine-1" =&gt; { "ip" =&gt; "1.2.3.4", "port" =&gt; "1234"},
        "maschine-2" =&gt; { "ip" =&gt; "1.2.3.5", "port" =&gt; "1235"},
      }  
    }
  }
  </code></pre>
  
  <p>however, I have not managed to parse properly it in the correspondig erb template.</p>
  
  <pre><code>&lt;% @settings.each_pair do |settings_key, settings_value_hash| %&gt;
  &lt;%= settings_value_hash['ip']%&gt;:&lt;%= settings_value_hash['port'] %&gt;
  
  option &lt;% @settings_value_hash['option'].each do |option| -%&gt; &lt;%= option  %&gt;   &lt;% end -%&gt;
  
  &lt;% @{settings_value_hash['machines']}.each_pair do |machine_key, machine_value_hash| %&gt;
    server &lt;%= machine_key %&gt;  &lt;%= machine_value_hash['ip'] %&gt;:&lt;%= machine_value_hash['port'] %&gt;
  &lt;% end %&gt;   
  </code></pre>
  
     
  
  <p>Thus, I can get the values in my top dictionary without problems, i.e., "ip" and "port",</p>
  
  <p>However, puppet throws me compile errors, when I try to get to the array "option" or the dict "machines" within the top dict.</p>
  
  <p>My guess at the moment is, that arrays and dicts/hashes are not "hashable" in Ruby/Puppet, or?</p>
  
  <p>Cheers and thanks for ideas,
    Thomas</p>