Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 1 | # -*- mode: ruby -*- |
| 2 | # vi: set ft=ruby : |
| 3 | |
| 4 | Vagrant.configure(2) do |config| |
| 5 | |
| 6 | if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil |
Zsolt Haraszti | 5dc859d | 2016-05-31 17:11:40 -0700 | [diff] [blame] | 7 | config.vm.synced_folder ".", "/cord", mount_options: ["dmode=700,fmode=600"] |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 8 | else |
Zsolt Haraszti | 5dc859d | 2016-05-31 17:11:40 -0700 | [diff] [blame] | 9 | config.vm.synced_folder ".", "/cord" |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 10 | end |
| 11 | |
| 12 | config.vm.define "corddev" do |d| |
Zsolt Haraszti | 5b5a42a | 2016-05-12 22:19:57 -0700 | [diff] [blame] | 13 | d.ssh.forward_agent = true |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 14 | d.vm.box = "ubuntu/trusty64" |
| 15 | d.vm.hostname = "corddev" |
| 16 | d.vm.network "private_network", ip: "10.100.198.200" |
| 17 | d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh" |
Zsolt Haraszti | 5dc859d | 2016-05-31 17:11:40 -0700 | [diff] [blame] | 18 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/ansible/corddev.yml -c local" |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 19 | d.vm.provider "virtualbox" do |v| |
| 20 | v.memory = 2048 |
| 21 | end |
| 22 | end |
| 23 | |
| 24 | config.vm.define "prod" do |d| |
| 25 | d.vm.box = "ubuntu/trusty64" |
| 26 | d.vm.hostname = "prod" |
| 27 | d.vm.network "private_network", ip: "10.100.198.201" |
| 28 | d.vm.provider "virtualbox" do |v| |
| 29 | v.memory = 1024 |
| 30 | end |
| 31 | end |
| 32 | |
| 33 | if Vagrant.has_plugin?("vagrant-cachier") |
| 34 | config.cache.scope = :box |
| 35 | end |
| 36 | |
| 37 | end |