require 'etc'
require 'shellwords'
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/centos-7.4"
config.vm.hostname = File.expand_path(File.dirname(__FILE__)).split('/')[-1]
config.vm.network "private_network", type: "dhcp"
config.vm.provider "virtualbox" do |vb|
vb.cpus = Etc.nprocessors
vb.memory = 1024
vb.linked_clone = true
end
config.vm.provision "ansible_local" do |ansible|
ansible.galaxy_role_file = "requirements.yml"
ansible.galaxy_roles_path = ".ansible/galaxy-roles"
ansible.provisioning_path = "/vagrant"
ansible.playbook = "vagrant.yml"
ansible.raw_arguments = Shellwords::shellwords(ENV.fetch("ANSIBLE_ARGS", ""))
end
end