Skip to content

Instantly share code, notes, and snippets.

@monkseal
Last active August 29, 2015 14:22
Show Gist options
  • Save monkseal/49ab1ba5513123c0d2c6 to your computer and use it in GitHub Desktop.
Save monkseal/49ab1ba5513123c0d2c6 to your computer and use it in GitHub Desktop.
Vagrantfile for Centos 6.6
# Host => Guest (VM)
FORWARD_PORTS = {
3000 => 3000, # webrick
13_306 => 3306 # MySQL
}
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
config.vm.box = 'opscode_centos-6.6'
config.vm.provider :virtualbox do |_f, override|
override.vm.box_url = 'https://s3.amazonaws.com/centos-vagrant/opscode_centos-6.6_chef-provisionerless.box'
end
config.ssh.password = 'vagrant'
config.vm.provision :shell, path: 'provision.sh', privileged: false
config.vm.synced_folder(
'.',
'/vagrant',
type: 'rsync',
rsync__exclude: [
'.git/',
'.vagrant/',
'config/database.yml',
'log/*',
'tmp/'
]
)
FORWARD_PORTS.each do |host, guest|
config.vm.network :forwarded_port, host: host, guest: guest
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment