title: Calling puppet defined resource with multiple parameters, multiple times
body: <p>I've got a simple puppet defined resource that looks like this:</p>
  
  <pre><code>define mything($number, $device, $otherthing) {
      file{"/place/${number}":
          ensure =&gt; directory
      }
      mount { "/place/${number}":
          device =&gt; $device,
          ensure =&gt; mounted,
          require =&gt; File["/place/${number}"]
      }
      file {"/place/${number}/${otherthing}":
          ensure =&gt; directory,
          require =&gt; Mount['/place/${number}']
      }
  }
  </code></pre>
  
  <p>I need to call this resource a number of times with different parameters, but can't figure out how to do this without explicitly calling <code>mything()</code> repeatedly. </p>
  
  <p>Ideally, I'd have all the parameters for the stored in some sort of array, and then just call <code>mything($array)</code>, a bit like this:</p>
  
  <pre><code>$array = [
      {number =&gt; 3, something =&gt; 'yes', otherthing =&gt; 'whatever'},
      {number =&gt; 17, something =&gt; 'ooo', otherthing =&gt; 'text'},
      {number =&gt; 4, something =&gt; 'no', otherthing =&gt; 'random'},
  ]
  
  mything($array)
  </code></pre>
  
  <p>But this doesn't appear to work. I'm fairly sure this would work if my resource only took a single parameter and I just had a flat array of values, but can I do the same thing with multiple named parameters?</p>