mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
Update Vagrantfile to support DHCP
Update Vagrantfile to support DHCP-assigned IP addresses for additional networks Signed-off-by: Scott S. Lowe <scott.lowe@scottlowe.org>
This commit is contained in:
parent
62837642cb
commit
d5582d7117
1 changed files with 5 additions and 1 deletions
6
complex-yaml/Vagrantfile
vendored
6
complex-yaml/Vagrantfile
vendored
|
|
@ -42,7 +42,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||
|
||||
# Iterate through networks as per settings in machines.yml
|
||||
machine['nics'].each do |net|
|
||||
srv.vm.network net['type'], ip: net['ip_addr']
|
||||
if net['ip_addr'] == 'dhcp'
|
||||
srv.vm.network net['type'], type: net['ip_addr']
|
||||
else
|
||||
srv.vm.network net['type'], ip: net['ip_addr']
|
||||
end # if net['ip_addr']
|
||||
end # machine['nics'].each
|
||||
|
||||
# Configure CPU & RAM per settings in machines.yml (Fusion)
|
||||
|
|
|
|||
Loading…
Reference in a new issue