feat: enable use of dhcp addresses in networkd (#273)
- change ipaddress to be optional - add dhcp option Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/273
This commit was merged in pull request #273.
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
Name=<%= @title %>
|
||||
|
||||
[Network]
|
||||
<% if @dhcp == true -%>
|
||||
DHCP=yes
|
||||
<% else -%>
|
||||
<% if @ipaddress && @netmask -%>
|
||||
Address=<%= @ipaddress %>/<%= IPAddr.new(@netmask).to_i.to_s(2).count('1') %>
|
||||
<% end -%>
|
||||
@@ -14,6 +17,7 @@ DNS=<%= Array(@dns).join(' ') %>
|
||||
<% if @domains -%>
|
||||
Domains=<%= Array(@domains).join(' ') %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% if @bridge and @bridge != true -%>
|
||||
Bridge=<%= @bridge %>
|
||||
<% end -%>
|
||||
|
||||
Reference in New Issue
Block a user