title: Apache vhost config with puppet and capistrano
body: <p>I am trying to deploy a webserver with puppet, and then I would use capistrano to deploy the code.</p>
  
  <p>My <code>site.pp</code> file looks like this:</p>
  
  <pre><code>file { ['/var/www/vhost', '/var/www/vhost/current']:
    ensure  =&gt; directory,
    replace =&gt; false,
  }
  
  class { 'apache': }
  
  apache::vhost { 'vhost.site.com':
    port    =&gt; '80',
    docroot =&gt; '/var/www/vhost/current',
  }
  </code></pre>
  
  <p>Problem is, when I deploy with Capistrano, it cannot create the links to the current folder, because it's already there (as a directory).</p>
  
  <p>Can anyone tell me how to set it up so I just point the docroot to the folder, but not actually creating the directory?</p>
  
  <p>I was thinking of a solution where I place the apache2 vhost config file and restart apache2 via puppet... but I don't think that's the right way to do it?</p>