title: Puppet - Notify a class with parameters
body: <p>I'm pretty new to puppet, and I've got stuck on how to notify a class with a parameter. I'm trying to notify a class that I found, which runs update-rc.d with a parameter:</p>
  
  <pre><code>define myclass::update-rc {
      exec { "update-rc_${title}":
          command =&gt; "update-rc.d ${title} defaults",
          cwd =&gt; "/tmp",
          path =&gt; "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:",
          refreshonly =&gt; true
      }
  }
  </code></pre>
  
  <p>And the class that I wish to notify it from:</p>
  
  <pre><code>class mysecondclass {
      file { '/etc/init.d/myscript':
          ensure =&gt; file,
          notify =&gt; Class['myclass::update-rc { "myscript": } ']
      }
  }
  </code></pre>
  
  <p>It fails with the error:</p>
  
  <p><code>Could not find dependent Exec[Myclass::update-rc { "myscript": } ] ...</code></p>
  
  <p>It does work if I just put <code>myclass::update-rc { "myscript": }</code> in the class like this:</p>
  
  <pre><code>class mysecondclass {
      file { '/etc/init.d/myscript':
          ensure =&gt; file,
      }
  
      myclass::update-rc { "myscript": }
  }
  </code></pre>
  
  <p>But I kinda wanted to notify it ... Is there a way I can achieve this?</p>