bundlewrap/bundles/systemd-networkd/files/template-iface-dhcp.network

27 lines
512 B
SYSTEMD

<%
from ipaddress import ip_network
%>\
[Match]
Name=${interface}
[Network]
DHCP=yes
IPv6AcceptRA=yes
[DHCPv4]
UseDomains=${str(config.get('use_dhcp_domains', False)).lower()}
UseHostname=no
UseMTU=${str(config.get('use_dhcp_mtu', True)).lower()}
UseNTP=${str(config.get('use_dhcp_ntp', False)).lower()}
UseTimezone=no
% if config.get('send_hostname', True):
SendHostname=yes
Hostname=${node.name.split('.')[-1]}
% else:
SendHostname=no
% endif
% if config.get('forwarding', False):
IPForward=yes
%endif