Skip to content

Instantly share code, notes, and snippets.

@rcrowley
Created Nov 9, 2010
Embed
What would you like to do?
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