title: Puppet parameterized classes and changing parameters
body: <p>I am trying to understand Puppet parameterized classes. I have a parameterized class defined this way:</p>
  
  <pre><code>class defaults(
    $no_samba = 'FALSE'
  )
  {
    if ($no_samba =~ /TRUE/) {
      notify { "will not install samba": } ;
    } else {
      # install samba here
    }
  
    # More server install tasks here...
  }
  </code></pre>
  
  <p>Furthermore, I define a basenode as follows:</p>
  
  <pre><code>node basenode
  {
    class {'defaults':
      no_samba =&gt; 'FALSE',
    }
  }
  </code></pre>
  
  <p>and then I instantiate a server:</p>
  
  <pre><code>node myserver1 inherits basenode {
    Class['defaults'] { no_samba =&gt; 'TRUE' }
  }
  </code></pre>
  
  <p>However, this does not work. The myserver1 node does not show the notify message indicating that samba will not be installed.</p>