Vagrantfile 1.46 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/trusty64"
  # config.vm.box = "ubuntu/vivid64"
  # config.vm.box = "relativkreativ/centos-7-minimal"
  # config.vm.box = "box-cutter/fedora22"
  # config.vm.box = "puppetlabs/centos-6.6-64-nocm"

  BOX_COUNT = 1
  (1..BOX_COUNT).each do |machine_id|
    config.vm.define "influx#{machine_id}" do |machine|
      machine.vm.hostname = "influx#{machine_id}"
15
      # machine.vm.network "private_network", ip: "10.0.3.#{1+machine_id}", virtualbox__intnet: true
16
      # machine.vm.network "public_network"
17
      machine.vm.network "public_network", :bridge => 'en0: Wi-Fi (AirPort)'
18
19
20
21
22
23
24
25
26
27
28
      
      machine.vm.provider "virtualbox" do |v|
        v.memory = 512
        v.cpus = 1
      end

      if machine_id == BOX_COUNT
        machine.vm.provision "ansible" do |ansible|
          # ansible.verbose = 'vvvv'
          ansible.limit = 'all'
          ansible.playbook = "test.yml"
29
30
31
32
          # ansible.playbook = "playbooks/0.9.4.2_to_0.9.5.1_upgrade_path.yml"
          # ansible.playbook = "playbooks/0.9.5.1_to_0.9.6_upgrade_path.yml"
          # ansible.playbook = "playbooks/0.9.4.2_to_0.9.6_upgrade_path.yml"
          # ansible.playbook = "playbooks/0.9.4.2_to_0.9.5.1_to_0.9.6_upgrade_path.yml"
33
34
          ansible.sudo = true
          ansible.host_key_checking = false
35
36
37
          ansible.extra_vars = {
            is_vagrant: true,
          }
38
39
40
41
42
43
        end
      end
      
    end
  end
end