title: Overwrite if if it exists or create if it does not
body: <p>I am trying to rewrite a file using puppet with the following function.</p>
  
  <p>If the file exists I still want the file to be rewrite from the source. Will this be achieved with the following method?</p>
  
  <pre><code>define setup_sysctl_conf( $dependence=File[$dummy_dependence_file] )
    {
          file { $name:
           path    =&gt; '/etc/sysctl.conf',
                   ensure  =&gt; present,
           mode    =&gt; 0777,
           source  =&gt; '/vagrant/files/sysctl.conf',
           require =&gt; $dependence, 
       }
  
    }
  </code></pre>