Skip to content

Instantly share code, notes, and snippets.

@rcrowley
Created Nov 8, 2010
Embed
What would you like to do?
Ruby dependency management with Puppet
stage { "pre": before => Stage["main"] }
class pre {
package {
"build-essential": ensure => latest;
"ruby": ensure => "4.5"; # Ruby 1.8.7
"ruby-dev": ensure => "4.5"; # Ruby 1.8.7
"rubygems": ensure => "1.3.7-2";
}
}
class { "pre": stage => "pre" }
package {
"json":
ensure => "1.4.6",
provider => gem;
"libmysqlclient-dev":
ensure => "5.1.49-1ubuntu8";
"mysql2":
ensure => "0.2.6",
provider => gem,
require => Package["libmysqlclient-dev"];
"nginx":
ensure => "0.7.67-3ubuntu1";
"sinatra":
ensure => "1.1.0",
provider => gem;
}
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":
a => /foo/,
b => "$bar",
c => $baz,
ensure => directory;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment