Skip to content

Instantly share code, notes, and snippets.

View rkhatibi's full-sized avatar

Ramin K rkhatibi

  • San Francisco, CA
View GitHub Profile
import 'mysql'
import 'apache'
node default {
include users
include db
include apache_server
exec {"apt-update":
command => "apt-get update",
define mysql::createdb {
exec { "create-${name}-db":
unless => "mysql -uroot -p${config::mysqlRootPassword} ${name}",
command => "mysql -uroot -p${config::mysqlRootPassword} -e \"create database ${name}; grant all on ${name}.* to ${config::dbUser}@localhost identified by '${config::dbPassword}';\"",
require => Service["mysql"],
}
}
apache::params:
class apache::params {
$vgname = 'vg01'
$lvname = 'wwwlv'
$lvsize = '2G'
$fstype = 'ext4'
$fsname = "/dev/${vgname}/${lvname}"
@rkhatibi
rkhatibi / gist:2345614
Created April 9, 2012 19:05 — forked from ranguard/gist:2345549
How to use the same list in puppet for multiple locations
$perl_modules = [ 'Data::Pageset', 'perl-module-b' ]
perlbrew::install_modules {
$perl_modules:
perl => 'a-version-of-perl'
}
perlbrew::install_modules {
$perl_modules: