feat(nas): Add extra disk

This commit is contained in:
Tanguy Herbron 2023-11-15 23:54:11 +01:00
parent 6e77283b01
commit c2a9140997

5
Vagrantfile vendored
View File

@ -14,13 +14,16 @@ Vagrant.configure("2") do |config|
{ :name => "hb-slim-3", :ip => "192.168.56.13"}, { :name => "hb-slim-3", :ip => "192.168.56.13"},
{ :name => "hb-wide-1", :ip => "192.168.56.101", :cpus => 2, :memory => 4096}, { :name => "hb-wide-1", :ip => "192.168.56.101", :cpus => 2, :memory => 4096},
{ :name => "hb-wide-2", :ip => "192.168.56.102", :cpus => 2, :memory => 4096}, { :name => "hb-wide-2", :ip => "192.168.56.102", :cpus => 2, :memory => 4096},
{ :name => "nas", :ip => "192.168.56.200", :cpus => 2, :memory => 4096}, { :name => "nas", :ip => "192.168.56.200", :cpus => 2, :memory => 4096, :drive => { name: "extra_disk", size: "30GB" }},
] ]
boxes.each do |opts| boxes.each do |opts|
config.vm.define opts[:name] do |box| config.vm.define opts[:name] do |box|
box.vm.hostname = opts[:name] box.vm.hostname = opts[:name]
box.vm.network "private_network", ip: opts[:ip] box.vm.network "private_network", ip: opts[:ip]
if !opts[:drive].nil?
box.vm.disk :disk, size: opts[:drive][:size], name: opts[:drive][:name]
end
box.vm.provider "virtualbox" do |v| box.vm.provider "virtualbox" do |v|
if !opts[:memory].nil? if !opts[:memory].nil?
v.memory = opts[:memory] v.memory = opts[:memory]