- migrate to systemd-networkd - setup dummy, bridge and static/ethernet interfaces - manage sshd.service droping to start ssh after networking is online - enable ip forewarding - add fastpool/data/incus dataset - enable ospf and frr - add loopback0 as ssh listenaddress - add loopback1/2 for ceph cluster/public traffic Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/245
38 lines
793 B
Plaintext
38 lines
793 B
Plaintext
[Match]
|
|
Name=<%= @title %>
|
|
|
|
[Network]
|
|
<% 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 -%>
|
|
<% 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 %>
|