Debian Codegraph @

vagrant/puppet/Vagrantfile

raw
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby :
3 VAGRANTFILE_API_VERSION = "2"
4
5 require "vagrant"
6
7 if Vagrant::VERSION < "1.5.0"
8 raise "py-junos-eznc requires Vagrant 1.5.x or higher"
9 end
10
11 builders = [
12 { name: "ubuntu-12.04",
13 box: "ubuntu-12.04",
14 url: "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box",
15 script: "ubuntu.sh",
16 ssh_port: 2001 },
17 { name: "ubuntu-12.10",
18 box: "ubuntu-12.10",
19 url: "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.10_chef-provisionerless.box",
20 script: "ubuntu.sh",
21 ssh_port: 2002 },
22 { name: "ubuntu-13.10",
23 box: "ubuntu-13.10",
24 url: "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-13.10_chef-provisionerless.box",
25 script: "ubuntu.sh",
26 ssh_port: 2003 },
27 { name: "fedora-19",
28 box: "fedora-19",
29 url: "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-19_chef-provisionerless.box",
30 script: "fedora-19.sh",
31 ssh_port: 2004 },
32 { name: "fedora-20",
33 box: "fedora-20",
34 url: "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-20_chef-provisionerless.box",
35 script: "fedora-20.sh",
36 ssh_port: 2005 },
37 { name: "centos-6.5",
38 box: "centos-6.5",
39 url: "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box",
40 script: "centos_6_x.sh",
41 ssh_port: 2006 },
42 { name: "debian-7.4",
43 box: "debian-7.4",
44 url: "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-7.4_chef-provisionerless.box",
45 script: "debian.sh",
46 ssh_port: 2007 },
47 { name: "freebsd-9.2",
48 box: "freebsd-9.2",
49 url: "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_freebsd-9.2_chef-provisionerless.box",
50 script: "freebsd.sh",
51 ssh_port: 2008 },
52 ]
53
54
55 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
56 builders.each do |opts|
57 config.vm.define opts[:name] do |config|
58 config.vm.box = opts[:box]
59 config.vm.box_url = opts[:url]
60 config.vm.boot_timeout = 120
61 config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", disabled: true
62 config.vm.network :forwarded_port, guest: 22, host: opts[:ssh_port], auto_correct: true
63 config.ssh.port = opts[:ssh_port]
64 # use sh to support FreeBSD
65 config.ssh.shell = "sh"
66 # use rsync for the synced folder to support FreeBSD
67 config.vm.synced_folder ".", "/vagrant", type: "rsync"
68 config.vm.provision :shell, :path => opts[:script]
69 config.vm.provision :puppet, :module_path => "modules", :options => "--debug", :synced_folder_type => "rsync"
70 end
71 config.vm.provider :virtualbox do |vb|
72 vb.customize ["modifyvm", :id, "--memory", "1024"]
73 vb.customize ["modifyvm", :id, "--cpus", "1"]
74 end
75 end
76
77 end