From 42204985e20a75c72fb905c334bf69e0b5ad7f33 Mon Sep 17 00:00:00 2001 From: OpenStack Proposal Bot Date: Fri, 3 Nov 2017 16:37:09 +0000 Subject: [PATCH] Updated from OpenStack Ansible Tests Change-Id: If5415f3ea9a311dc7ca9163e075fe2493ed46283 --- Vagrantfile | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 3daef6c..33cb23f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,16 +1,31 @@ +# Verify whether required plugins are installed. +required_plugins = [ "vagrant-disksize" ] +required_plugins.each do |plugin| + if not Vagrant.has_plugin?(plugin) + raise "The vagrant plugin #{plugin} is required. Please run `vagrant plugin install #{plugin}`" + end +end + Vagrant.configure(2) do |config| config.vm.provider "virtualbox" do |v| v.memory = 2048 v.cpus = 2 end + config.vm.provision "shell", + privileged: false, + inline: <<-SHELL + cd /vagrant + ./run_tests.sh + SHELL + config.vm.define "ubuntu1604" do |xenial| + xenial.disksize.size = "40GB" xenial.vm.box = "ubuntu/xenial64" - xenial.vm.provision "shell", inline: <<-SHELL - sudo su - - cd /vagrant - apt-get update - ./run_tests.sh - SHELL end + + config.vm.define "centos7" do |centos7| + centos7.vm.box = "centos/7" + end + end