title: How do I make puppet copy a file only if source exists?
body: <p>I am trying to provision a vagrant VM to allow users to supply their own bash_profile.local but I don't want this file tracked in the vm's vcs repo. I have a tracked bash_profile.local.dist file that they can rename. How can I tell puppet to only create a file if the source file exists? It is currently working correctly but logs an error during provisioning and this is what I'm trying to avoid.</p>
  
  <p>This is the manifest:</p>
  
  <pre><code>class local
  {
      file { '.bash_profile.local':
          source =&gt; 'puppet:///modules/local/bash_profile.local',
          path =&gt; '/home/vagrant/.bash_profile.local',
          replace =&gt; false,
          mode =&gt; 0644,
          owner =&gt; 'vagrant',
          group =&gt; 'vagrant',
      }
  }
  </code></pre>