Fix Vagrantfile (debian is not freebsd)... uh? :)

pull/22/head
Emilien Mantel 2016-03-09 10:28:06 +01:00
parent 2cfda9a930
commit 078c3420e1
1 changed files with 28 additions and 21 deletions

43
Vagrantfile vendored
View File

@ -5,11 +5,14 @@
Vagrant.configure("2") do |config| Vagrant.configure("2") do |config|
vms = [ vms_debian = [
[ "freebsd-10.2", "freebsd/FreeBSD-10.2-STABLE" ],
[ "debian-wheezy", "debian/wheezy64" ], [ "debian-wheezy", "debian/wheezy64" ],
[ "debian-jessie", "debian/jessie64" ], [ "debian-jessie", "debian/jessie64" ],
[ "debian-stretch", "sharlak/debian_stretch_64" ] [ "debian-stretch", "sharlak/debian_stretch_64" ],
]
vms_freebsd = [
[ "freebsd-10.2", "freebsd/FreeBSD-10.2-STABLE" ]
] ]
config.vm.provider "virtualbox" do |v| config.vm.provider "virtualbox" do |v|
@ -17,28 +20,33 @@ Vagrant.configure("2") do |config|
v.memory = 256 v.memory = 256
end end
vms.each do |vm| vms_debian.each do |vm|
config.vm.define vm[0] do |m| config.vm.define vm[0] do |m|
m.vm.box = vm[1] m.vm.box = vm[1]
m.vm.network "private_network", type: "dhcp" m.vm.network "private_network", type: "dhcp"
# See: https://forums.freebsd.org/threads/52717/
if vm[0] = "freebsd-10.2"
m.vm.guest = :freebsd
m.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
m.ssh.shell = "sh"
#m.vm.base_mac = "0800278DFFF5"
m.vm.base_mac = "080027D14C66"
#m.vm.network "public_network", bridge: 'enp4s0', auto_config: false
m.vm.provision "shell", inline: "pkg install -y python bash"
end
m.vm.provision "ansible" do |ansible| m.vm.provision "ansible" do |ansible|
ansible.playbook = "tests/test.yml" ansible.playbook = "tests/test.yml"
ansible.groups = { "test" => [ vm[0] ] } ansible.groups = { "test" => [ vm[0] ] }
ansible.verbose = 'vv' ansible.verbose = 'vv'
ansible.sudo = true ansible.sudo = true
if vm[0] = "freebsd-10.2" end
end
end
# See: https://forums.freebsd.org/threads/52717/
vms_freebsd.each do |vm|
config.vm.define vm[0] do |m|
m.vm.box = vm[1]
m.vm.network "private_network", type: "dhcp"
m.vm.guest = :freebsd
m.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
m.ssh.shell = "sh"
m.vm.base_mac = "080027D14C66"
m.vm.provision "shell", inline: "pkg install -y python bash"
m.vm.provision "ansible" do |ansible|
ansible.playbook = "tests/test.yml"
ansible.groups = { "test" => [ vm[0] ] }
ansible.verbose = 'vv'
ansible.sudo = true
ansible.extra_vars = { ansible.extra_vars = {
ansible_python_interpreter: '/usr/local/bin/python' ansible_python_interpreter: '/usr/local/bin/python'
} }
@ -46,4 +54,3 @@ Vagrant.configure("2") do |config|
end end
end end
end end
end