|
@ -3,7 +3,7 @@ |
|
|
|
|
|
|
|
|
require 'fileutils' |
|
|
require 'fileutils' |
|
|
|
|
|
|
|
|
Vagrant.require_version ">= 1.9.0" |
|
|
|
|
|
|
|
|
Vagrant.require_version ">= 2.0.0" |
|
|
|
|
|
|
|
|
CONFIG = File.join(File.dirname(__FILE__), "vagrant/config.rb") |
|
|
CONFIG = File.join(File.dirname(__FILE__), "vagrant/config.rb") |
|
|
|
|
|
|
|
@ -135,12 +135,6 @@ Vagrant.configure("2") do |config| |
|
|
|
|
|
|
|
|
config.vm.network :private_network, ip: ip |
|
|
config.vm.network :private_network, ip: ip |
|
|
|
|
|
|
|
|
# workaround for Vagrant 1.9.1 and centos vm |
|
|
|
|
|
# https://github.com/hashicorp/vagrant/issues/8096 |
|
|
|
|
|
if Vagrant::VERSION == "1.9.1" && $os == "centos" |
|
|
|
|
|
config.vm.provision "shell", inline: "service network restart", run: "always" |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
# Disable swap for each vm |
|
|
# Disable swap for each vm |
|
|
config.vm.provision "shell", inline: "swapoff -a" |
|
|
config.vm.provision "shell", inline: "swapoff -a" |
|
|
|
|
|
|
|
@ -164,7 +158,7 @@ Vagrant.configure("2") do |config| |
|
|
if File.exist?(File.join(File.dirname($inventory), "hosts")) |
|
|
if File.exist?(File.join(File.dirname($inventory), "hosts")) |
|
|
ansible.inventory_path = $inventory |
|
|
ansible.inventory_path = $inventory |
|
|
end |
|
|
end |
|
|
ansible.sudo = true |
|
|
|
|
|
|
|
|
ansible.become = true |
|
|
ansible.limit = "all" |
|
|
ansible.limit = "all" |
|
|
ansible.host_key_checking = false |
|
|
ansible.host_key_checking = false |
|
|
ansible.raw_arguments = ["--forks=#{$num_instances}", "--flush-cache"] |
|
|
ansible.raw_arguments = ["--forks=#{$num_instances}", "--flush-cache"] |
|
|