summaryrefslogtreecommitdiffstats
path: root/tests/vagrant/vagrant-template/Vagrantfile
blob: ccbbf60575d8cef1607ea84e3126c6735c1c0cfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
    config.vm.define "vagrant-testVM" do |testvm|
      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


      # Define basic config for VM, memory, cpu, storage pool
      testvm.vm.provider "libvirt" do |lv|
        lv.storage_pool_name = "default"
        lv.memory = 1024
        lv.cpus = 1


        # We need a brick partition, lets have a 5G disk for that.
        # If you need more bricks, just add more letters to the
        # string below.
        "b".split("").each do |i|
          lv.storage :file,
          #:path           => "",
          #:allow_existing => "",
          :device         => "vd#{i}",
          :size           => "5G",
          :type           => "qcow2",
          :bus            => "virtio",
          :cache          => "default"
        end
      end

      # Let's provision
      testvm.vm.provision "ansible", run: "always" do |setup|
        setup.verbose = "v"
        setup.playbook = "setup.yml"
      end

    end
end