Skip to content

Instantly share code, notes, and snippets.

@cirpo
Created June 12, 2012 21:16
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 cirpo/2920185 to your computer and use it in GitHub Desktop.
Save cirpo/2920185 to your computer and use it in GitHub Desktop.
class sandbox {
package {
["php5-cli", "php-pear", "php5-xdebug", "php5-sqlite", "php5-intl", "php5-curl", "php-apc", "apache2", "mysql-server", "php5-mysql", "libapache2-mod-php5"]:
ensure => latest;
}
package {
"git-core":
ensure => latest;
}
file {
"/home/vagrant/.bash_aliases":
content => "cd /app",
}
file {
"/etc/apache2/sites-enabled/sandbox.lo":
content => "<VirtualHost *:80>
DocumentRoot /app/web
<Directory /app/web>
AllowOverride All
Options Indexes FollowSymLinks
</Directory>
</VirtualHost>",
require => Package["apache2"],
notify => Service["apache2"],
}
file {
"/etc/apache2/sites-enabled":
recurse => true,
purge => true,
require => Package["apache2"],
notify => Service["apache2"],
}
file {
"/etc/php5/conf.d/01-settings.ini":
content => 'date.timezone = "UTC"
short_open_tag = Off',
require => Package["php5-cli"],
notify => Service["apache2"],
}
service {
"apache2":
ensure => running,
hasrestart => true,
hasstatus => true,
require => Package["apache2"],
}
exec {
'pear-init':
command => '/usr/bin/pear upgrade pear',
require => Package['php-pear']
}
exec {
"phpunit-init":
command => "/usr/bin/pear config-set auto_discover 1",
require => Package['pear-init']
}
exec {
"phpunit-installation":
command => "/usr/bin/pear install pear.phpunit.de/PHPUnit",
require => Package["phpunit-instalation"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment