]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
testing: parse and set DISABLE_SYNCED_FOLDER in vagrant file
authorAlfredo Deza <adeza@redhat.com>
Mon, 14 Nov 2016 18:25:26 +0000 (13:25 -0500)
committerAlfredo Deza <adeza@redhat.com>
Tue, 15 Nov 2016 12:53:05 +0000 (07:53 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
Vagrantfile

index 8bbc3a675ddb4b18b625d2c80c9378bf2ae71008..3957d4c235621f239ce7b141a6084d6ea5310a9f 100644 (file)
@@ -30,6 +30,7 @@ DOCKER         = settings['docker']
 USER           = settings['ssh_username']
 
 ASSIGN_STATIC_IP = !(BOX == 'openstack' or BOX == 'linode')
+DISABLE_SYNCED_FOLDER = settings.fetch('vagrant_disable_synced_folder', false)
 
 ansible_provision = proc do |ansible|
   if DOCKER then
@@ -126,9 +127,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
   config.ssh.private_key_path = settings['ssh_private_key_path']
   config.ssh.username = USER
 
-  # Faster bootup.  Disable if you need this for libvirt
-  config.vm.provider :libvirt do |v,override|
-    override.vm.synced_folder '.', SYNC_DIR, disabled: true
+  # Faster bootup. Disables mounting the sync folder for libvirt and virtualbox
+  if DISABLE_SYNCED_FOLDER
+    config.vm.provider :virtualbox do |v,override|
+      override.vm.synced_folder '.', SYNC_DIR, disabled: true
+    end
+    config.vm.provider :libvirt do |v,override|
+      override.vm.synced_folder '.', SYNC_DIR, disabled: true
+    end
   end
 
   if BOX == 'openstack'