Zsolt Haraszti | a6274b6 | 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 |
| 7 | config.vm.synced_folder ".", "/opencord", mount_options: ["dmode=700,fmode=600"] |
| 8 | else |
| 9 | config.vm.synced_folder ".", "/opencord" |
| 10 | end |
| 11 | |
| 12 | config.vm.define "corddev" do |d| |
| 13 | d.vm.box = "ubuntu/trusty64" |
| 14 | d.vm.hostname = "corddev" |
| 15 | d.vm.network "private_network", ip: "10.100.198.200" |
| 16 | d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh" |
| 17 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /opencord/ansible/corddev.yml -c local" |
| 18 | d.vm.provider "virtualbox" do |v| |
| 19 | v.memory = 2048 |
| 20 | end |
| 21 | end |
| 22 | |
| 23 | config.vm.define "prod" do |d| |
| 24 | d.vm.box = "ubuntu/trusty64" |
| 25 | d.vm.hostname = "prod" |
| 26 | d.vm.network "private_network", ip: "10.100.198.201" |
| 27 | d.vm.provider "virtualbox" do |v| |
| 28 | v.memory = 1024 |
| 29 | end |
| 30 | end |
| 31 | |
| 32 | if Vagrant.has_plugin?("vagrant-cachier") |
| 33 | config.cache.scope = :box |
| 34 | end |
| 35 | |
| 36 | end |