Skip to content

Instantly share code, notes, and snippets.

@ojacobson
Forked from st3fan/gist:6515999
Last active December 22, 2015 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ojacobson/6516067 to your computer and use it in GitHub Desktop.
Save ojacobson/6516067 to your computer and use it in GitHub Desktop.
class my_app {
$checkout = "/vagrant"
$virtualenv = "/home/vagrant/env"
python::virtualenv { $virtualenv:
ensure => present,
owner => "vagrant",
version => "system",
}
exec { 'setup':
command => "python setup.py develop",
cwd => $checkout,
path => "${virtualenv}/bin",
refreshonly => true,
subscribe => Python::Virtualenv[$virtualenv],
}
Class['python'] -> Class['my-app'] # puppet 3 makes this nicer, ask me how
}
# ...
class { 'python':
version => 'system',
dev => true,
virtualenv => true,
}
include 'my_app'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment