title: Puppet: Defining custom resource types wrapping exec resources and using optional "unless"
body: <p>The following code example is purely academical but it illustrates my question pretty well. </p>
  
  <pre><code>define touch($file=$title, $unless='/bin/false') {
      exec { "/bin/touch ${file}": unless =&gt; $unless }
  }
  </code></pre>
  
  <p>If I define my own resource type that wraps another <em>exec</em> resource and I want to <strong>add an optional "unless" condition</strong> that I - if set - pass to the optional "unless" condiftion of <em>exec</em> - do I have to preset the field with '/bin/false'?</p>
  
  <p>My understanding is that for each catalog run and all uses of this custom ressource type this resource's unless check will then spawn a bash process running '/bin/false' if the unless field of "touch" hasn't been set .</p>
  
  <p>What I actually intend is not to do any "unless" check at all if the field hasn't been set - including calling "/bin/false".</p>
  
  <p>Any thoughts? Thanks!</p>