Skip to content

Instantly share code, notes, and snippets.

@rcrowley
Created November 9, 2010 01:46
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 rcrowley/668598 to your computer and use it in GitHub Desktop.
Save rcrowley/668598 to your computer and use it in GitHub Desktop.
Python dependency management with Puppet
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