Skip to content

Instantly share code, notes, and snippets.

@Tocacar
Created May 16, 2013 14:33
Show Gist options
  • Select an option

  • Save Tocacar/5592155 to your computer and use it in GitHub Desktop.

Select an option

Save Tocacar/5592155 to your computer and use it in GitHub Desktop.
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "192.168.56.101"
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 1024]
end
config.vm.synced_folder "/Library/WebServer/Documents", "/var/www", id: "vagrant-root"
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "manifests"
puppet.module_path = "modules"
puppet.options = ['--verbose']
end
end
exec { 'apt-get update' :
command => 'apt-get update',
path => '/usr/bin/',
timeout => 60,
tries => 3
}
class { 'apt' :
always_apt_update => true
}
package { ['python-software-properties'] :
ensure => 'installed',
require => Exec['apt-get update'],
}
file { '/home/vagrant/.bash_aliases' :
source => 'puppet:///modules/puphpet/dot/.bash_aliases',
ensure => 'present',
}
package { ['build-essential', 'vim', 'curl', 'git', 'composer'] :
ensure => 'installed',
require => Exec['apt-get update'],
}
class { 'apache' : }
apache::dotconf { 'custom' :
content => 'EnableSendfile Off',
}
apache::module { 'rewrite' : }
apache::vhost { 'gms.dev' :
server_name => 'gms.dev',
serveraliases => ['gms.dev'],
docroot => '/var/www/',
port => '80',
env_variables => [],
priority => '1'
}
apt::ppa { 'ppa:ondrej/php5' : }
class { 'php' :
service => 'apache',
require => Package['apache'],
}
class { 'php::devel' :
require => Class['php'],
}
class { 'php::pear' :
require => Class['php'],
}
class { 'xdebug' : }
xdebug::config { 'cgi' : }
xdebug::config { 'cli' : }
php::ini { 'default' :
value => [
'date.timezone = America/Chicago',
'display_errors = On',
'error_reporting = -1'
],
target => 'error_reporting.ini'
}
class { 'mysql' :
root_password => 'nbfawg',
}
mysql::grant { 'grants' :
mysql_privileges => 'ALL',
mysql_db => 'grants',
mysql_user => 'root',
mysql_password => 'nbfawg',
mysql_host => 'localhost',
mysql_grant_filepath => '/home/vagrant/puppet-mysql',
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment