summaryrefslogtreecommitdiffstats
path: root/tests/vagrant
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vagrant')
-rw-r--r--tests/vagrant/vagrant-template/Vagrantfile11
-rw-r--r--tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml3
-rw-r--r--tests/vagrant/vagrant-template/roles/remove-gluster-pkgs/tasks/main.yml4
-rw-r--r--tests/vagrant/vagrant-template/setup.yml7
4 files changed, 12 insertions, 13 deletions
diff --git a/tests/vagrant/vagrant-template/Vagrantfile b/tests/vagrant/vagrant-template/Vagrantfile
index fda113f98de..ccbbf60575d 100644
--- a/tests/vagrant/vagrant-template/Vagrantfile
+++ b/tests/vagrant/vagrant-template/Vagrantfile
@@ -3,7 +3,8 @@
Vagrant.configure("2") do |config|
config.vm.define "vagrant-testVM" do |testvm|
- testvm.vm.box = "fedora/23-cloud-base"
+ testvm.vm.box = "gluster-dev-fedora"
+ testvm.vm.box_url = "http://download.gluster.org/pub/gluster/glusterfs/vagrant/gluster-dev-fedora/boxes/gluster-dev-fedora.json"
testvm.vm.hostname = "vagrant-testVM"
#testvm.ssh.insert_key = false
testvm.vm.synced_folder ".", "/vagrant", disabled: true
@@ -32,14 +33,6 @@ Vagrant.configure("2") do |config|
end
# Let's provision
-
- # Some packages are required for ansible dnf module to work
- # so install them using shell inline
- testvm.vm.provision "shell", inline: "sudo dnf install -y python-dnf", run: "always"
- testvm.vm.provision "shell", inline: "sudo dnf install -y libselinux-python", run: "always"
- testvm.vm.provision "shell", inline: "sudo dnf install -y libsemanage-python", run: "always"
-
- # Now onto the main provisioning
testvm.vm.provision "ansible", run: "always" do |setup|
setup.verbose = "v"
setup.playbook = "setup.yml"
diff --git a/tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml b/tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml
index 38cfd6ae8b6..ee209e8865d 100644
--- a/tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml
+++ b/tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml
@@ -69,6 +69,3 @@
- xfsprogs
- yajl-devel
-- name: Erase gluster packages, keep dependencies; we will source install
- shell: rpm -ev --nodeps `rpm -qa | grep ^gluster`
- ignore_errors: True
diff --git a/tests/vagrant/vagrant-template/roles/remove-gluster-pkgs/tasks/main.yml b/tests/vagrant/vagrant-template/roles/remove-gluster-pkgs/tasks/main.yml
new file mode 100644
index 00000000000..c91efa9ba7c
--- /dev/null
+++ b/tests/vagrant/vagrant-template/roles/remove-gluster-pkgs/tasks/main.yml
@@ -0,0 +1,4 @@
+---
+- name: Erase gluster packages, keep dependencies; we will source install
+ shell: rpm -ev --nodeps `rpm -qa | grep ^gluster`
+ ignore_errors: True
diff --git a/tests/vagrant/vagrant-template/setup.yml b/tests/vagrant/vagrant-template/setup.yml
index 691c7aff07f..454c171300d 100644
--- a/tests/vagrant/vagrant-template/setup.yml
+++ b/tests/vagrant/vagrant-template/setup.yml
@@ -2,7 +2,12 @@
- hosts: all
sudo: true
roles:
- - install-pkgs
+ #Installing packages invoke dnf and metadata download takes a long time.
+ #The box used in Vagrantfile has all the packages installed.
+ #Refer to main.yml file in install-pkgs role to get list of packages.
+ #install-pkgs role is hence disabled by default.
+ #- install-pkgs
+ - remove-gluster-pkgs
- prepare-brick
- mock-user
- selinux