Created
November 9, 2010 01:46
-
-
Save rcrowley/668598 to your computer and use it in GitHub Desktop.
Python dependency management with Puppet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stage { "pre": before => Stage["main"] } | |
class pre { | |
package { | |
"build-essential": ensure => latest; | |
"python": ensure => ""; | |
"python-dev": ensure => ""; | |
"python-setuptools": ensure => ""; | |
} | |
exec { "easy_install pip": | |
path => "/usr/local/bin:/usr/bin:/bin", | |
refreshonly => true, | |
require => Package["python-setuptools"], | |
subscribe => Package["python-setuptools"], | |
} | |
} | |
class { "pre": stage => "pre" } | |
package { | |
"django": | |
ensure => "1.2.3", | |
provider => pip; | |
"libmysqlclient-dev": | |
ensure => "5.1.49-1ubuntu8"; | |
"mysql-python": | |
ensure => "1.2.3", | |
provider => pip, | |
require => Package["libmysqlclient-dev"]; | |
"nginx": | |
ensure => "0.7.67-3ubuntu1"; | |
} | |
file { | |
"/etc/nginx/sites-available/example": | |
content => " | |
server { | |
listen 80; | |
root /var/www/example; | |
} | |
", | |
ensure => file; | |
"/etc/nginx/sites-enabled/example": | |
ensure => "/etc/nginx/sites-available/example"; | |
"/var/www/example": | |
ensure => directory; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment