Skip to content

Commit

Permalink
fix: rubocop linting
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkProminic authored Dec 12, 2023
1 parent 646c8d3 commit 123799f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/vagrant-zones/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def zonenicnatsetup_netplan(uii, opts, mac)
netplan1 = %(network:\n version: 2\n ethernets:\n #{vnic_name}:\n match:\n macaddress: #{mac}\n)
netplan2 = %( dhcp-identifier: mac\n dhcp4: #{opts[:dhcp4]}\n dhcp6: #{opts[:dhcp6]}\n)
netplan3 = %( set-name: #{vnic_name}\n addresses: [#{ip}/#{shrtsubnet}]\n routes:\n - to: default\n via: #{defrouter}\n)
netplan4 = %( nameservers:\n addresses: [#{servers}] ) unless opts[:dns].nil?
netplan4 = %( nameservers:\n addresses: [#{servers}] ) unless opts[:dns].nil?
netplan = netplan1 + netplan2 + netplan3 + netplan4
cmd = "echo -e '#{netplan}' | sudo tee /etc/netplan/#{vnic_name}.yaml && chmod 400 /etc/netplan/#{vnic_name}.yaml"
uii.info(I18n.t('vagrant_zones.netplan_applied_static') + "/etc/netplan/#{vnic_name}.yaml") if ssh_run_command(uii, cmd)
Expand Down Expand Up @@ -1143,7 +1143,6 @@ def zoneniczloginsetup_netplan(uii, opts, mac)
netplan2 = %( dhcp-identifier: mac\n dhcp4: #{opts[:dhcp4]}\n dhcp6: #{opts[:dhcp6]}\n) if opts[:dhcp4]
netplan3 = %( set-name: #{vnic_name}\n addresses: [#{ip}/#{shrtsubnet}]\n)
netplan3 = %( set-name: #{vnic_name}\n) if opts[:dhcp4]
#netplan4 = %( gateway4: #{defrouter}\n)
netplan4 = %( routes:\n - to: default\n via: #{defrouter}\n)
netplan5 = %( nameservers:\n addresses: [#{servers}] ) unless opts[:dns].nil?
netplan = netplan1 + netplan2 + netplan3 + netplan5 if opts[:gateway].nil?
Expand Down

0 comments on commit 123799f

Please sign in to comment.