- add route-reflector role and hieradata - enable using dhcp in networkd - add hieradata/node/* entries for route-reflectors
42 lines
849 B
Plaintext
42 lines
849 B
Plaintext
[Match]
|
|
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 -%>
|
|
<% if @gateway -%>
|
|
Gateway=<%= @gateway %>
|
|
<% end -%>
|
|
<% if @dns -%>
|
|
DNS=<%= Array(@dns).join(' ') %>
|
|
<% end -%>
|
|
<% if @domains -%>
|
|
Domains=<%= Array(@domains).join(' ') %>
|
|
<% end -%>
|
|
<% end -%>
|
|
<% if @bridge and @bridge != true -%>
|
|
Bridge=<%= @bridge %>
|
|
<% end -%>
|
|
<% if @vlan -%>
|
|
VLAN=<%= @vlan %>
|
|
<% end -%>
|
|
<% if @nocarrier and @nocarrier == true -%>
|
|
ConfigureWithoutCarrier=true
|
|
DuplicateAddressDetection=none
|
|
RequiredForOnline=no-carrier
|
|
<% end -%>
|
|
<% if @type == 'dummy' -%>
|
|
LinkLocalAddressing=no
|
|
ActivationPolicy=always-up
|
|
<% end -%>
|
|
<% if @forwarding and @forwarding == true -%>
|
|
IPForward=true
|
|
<% end -%>
|
|
|
|
[Link]
|
|
MTUBytes=<%= @mtu %>
|