Skip to content

Instantly share code, notes, and snippets.

@shekarsiri
Created February 5, 2014 05:28
Show Gist options
  • Save shekarsiri/8817884 to your computer and use it in GitHub Desktop.
Save shekarsiri/8817884 to your computer and use it in GitHub Desktop.
site.pp
#puppet module install example42/php;
#puppet module install puppetlabs/apache;
#puppet module install puppetlabs/mysql"
# config.vm.provision :puppet do |puppet|
# puppet.manifests_path = "manifests"
# puppet.manifest_file = "site.pp"
# puppet.module_path = "/Users/[USERNAME]/.puppet/modules"
# end
class {"apache":
mpm_module => 'prefork'
}
class {"apache::mod::php":
require => Exec["update"]
}
class { 'php':
require => Exec["update"]
}
class { '::mysql::server':
root_password => 'root',
override_options => { 'mysqld' => { 'max_connections' => '1024' } },
require => Exec["update"]
}
apache::mod { 'rewrite': }
php::module { "mcrypt": }
php::module { "curl": }
php::module { "gd": }
php::module { "xdebug": }
php::module { "mysql": }
php::module { "mysql": }
#MySQLi, MySQL, PDO_MySQL
apache::vhost{"laravel.dev":
port => 80,
docroot => "/vagrant/laravel/public",
directories => [ { path => '/vagrant/laravel/public', allow_override => 'All', allow => 'from all' } ],
}
apache::vhost{"admin.dev":
port => 80,
docroot => "/vagrant/admin",
directories => [ { path => '/vagrant/admin', allow_override => 'All', allow => 'from all' } ],
}
Exec {
path => ["/usr/bin", "/usr/local/bin"],
}
exec {"update" :
command => "apt-get update"
}
include php
include apache
include '::mysql::server'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment