This repository has been archived by the owner on Sep 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
boxes.rb
50 lines (41 loc) · 1.97 KB
/
boxes.rb
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
44
45
46
47
48
49
50
module Boxes
BOXEN = %w{
https://s3.amazonaws.com/cfengine.vagrant-baseboxes/openSUSE-11.4-x86_64-201309251236.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/centos-5.5-x86_64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/centos-5.6-x86_64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/centos-5.7-x86_64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/centos-5.8-x86_64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/centos-5.9-x86_64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/centos-6.0-x86_64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/centos-6.1-x86_64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/centos-6.2-x86_64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/centos-6.3-x86_64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/centos-6.4-x86_64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/ubuntu-10.04-amd64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/ubuntu-10.04-i386-201307100003.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/ubuntu-10.10-amd64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/ubuntu-11.04-amd64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/ubuntu-11.10-amd64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/ubuntu-12.04-amd64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/ubuntu-12.10-amd64-201306301713.box
https://s3.amazonaws.com/Vagrant_BaseBoxes/ubuntu-13.04-amd64-201306301713.box
http://files.vagrantup.com/precise32.box
http://files.vagrantup.com/lucid32.box
}
def Boxes.find(name)
found = BOXEN.grep(/#{name}/)
return found.first if found.length == 1
warn "Box name #{name} has " + (found.empty? ? "no matches" : "more than 1 match: #{found.join(' ')}")
return
end
def Boxes.type(name)
case name
when /ubuntu/
return :ubuntu
when /centos/
return :centos
when /suse/i
return :suse
end
end
end