title: Puppet to only create virtualenv once
body: <p>I am using this class in my manifest:</p>
  
  <pre><code>python::virtualenv { $virtualenv_dir:
  ensure =&gt; present,
  version =&gt; 'system',
  systempkgs =&gt; false,
  distribute =&gt; false,
  owner =&gt; $user,
  group =&gt; $group,
  }
  </code></pre>
  
  <p>It works great the first time.</p>
  
  <p>The problem is I have several daemonized celery workers launched which are using the venv/bin/python file.</p>
  
  <p>When I apply the manifest second time, I get:</p>
  
  <pre><code>Already using interpreter /usr/bin/python
  Traceback (most recent call last):
  File "/usr/bin/virtualenv", line 3, in 
  virtualenv.main()
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 938, in main
  never_download=options.never_download)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 1039, in create_environment
  site_packages=site_packages, clear=clear))
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 1274, in install_python
  shutil.copyfile(executable, py_executable)
  File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
  with open(dst, 'wb') as fdst:
  IOError: [Errno 26] Text file busy: '/usr/local/myapp/venv/bin/python'
  </code></pre>
  
  <p>Is it somehow possible to only run virtualenv command if the venv directory has not been created yet?</p>
  
  <p>Or what would you suggest? I don't want to stop my celery workers while applying the puppet manifest.</p>